You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems that AutoTiktokenizer is handling newline characters differently than Huggingface.
fromautotiktokenizerimportAutoTikTokenizerfromtransformersimportAutoTokenizertext="This is an \nexample"hf_tokenizer=AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
auto_tokenizer=AutoTikTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
hf_tokens=hf_tokenizer.encode(text, add_special_tokens=False)
auto_tokens=auto_tokenizer.encode(text)
asserthf_tokens==auto_tokens# This fails.
The text was updated successfully, but these errors were encountered:
Seems that
AutoTiktokenizer
is handling newline characters differently than Huggingface.The text was updated successfully, but these errors were encountered: