Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add model styles w/out BOS #70

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add model styles w/out BOS #70

wants to merge 2 commits into from

Conversation

chimezie
Copy link
Contributor

@chimezie chimezie commented Feb 1, 2024

When doing low-level finetuning (without the aid of HF's SFTtrainer library, for example), you may need to be able to tokenize a string with the model's prompting format but without special characters (BOS and EOS). Mistral is the only model format in model_style.py with a distinct BOS character separate from other delimiters (such as <|im_start|> for chatml, which is not really a BOS but a structured delimiter). So, I added a template without the

<s>

BOS character. In any case, BOS characters would usually be added by the tokenizer before the prompt is fed to the model and this would therefore happen downstream from OgbujiPT.

The [INST][/INST] delimiters wrap preamble, context, *and* query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant