Repository navigation
vocab : fix Nemotron-3.5-Embed tokenization - #30974
Conversation
Sorry, what? Where does it do that? |
The https://huggingface.co/nvidia/Nemotron-3.5-Embed-1B-BF16/blob/main/chat_template.jinja#L7-L9 and the normalization is defined at https://huggingface.co/nvidia/Nemotron-3.5-Embed-1B-BF16/blob/main/tokenizer.json#L9007 |
Oh wow, that's, hm, special... "normalizer": {
"type": "Sequence",
"normalizers": [
{
"type": "Replace",
"pattern": {
"String": "[\u200c"
},
"content": "["
},
{
"type": "Replace",
"pattern": {
"String": "<\u200c"
},
"content": "<"
}
]
} |
CISC
left a comment
There was a problem hiding this comment.
Well, this sucks, but not likely we can generalize it within reason.
|
Rebase? |
Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
aab21e0 to
7ead41c
Compare
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
* vocab : fix Nemotron-3.5-Embed tokenization * Update src/llama-vocab.h Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co> * rename * Update src/llama-vocab.cpp Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com> --------- Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co> Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Overview
Nemotron-3.5-Embed inserts
U+200Cimmediately after[and<in user input (Nemotron-3 does not). The official implementation removes these characters after identifying special tokens, but #30877 left them intact. This fix adds the missing normalization step.Sorry for the oversight! 🙏
Requirements