LucaMotz commited on
Commit
3204be8
·
verified ·
1 Parent(s): a0dcd81

Support native Transformers loading

Browse files

I'm adding native Phi-3-vision support to Transformers in https://github.com/huggingface/transformers/pull/51214, and VLM2Vec-Full loads with the same classes. This PR declares `<|image|>` as the image token in `tokenizer_config.json` and sets `rstrip: false` on it (also in `tokenizer.json`); with the native processor, write `<|image|>` where the remote processor used `<|image_1|>`.

The remote code, `auto_map` and the weights are unchanged, so `trust_remote_code=True` keeps working: with transformers 4.48.3 the tokenization is identical with and without these files.

2 files changed +5 -2
Files changed (2)
tokenizer.json+1-1
tokenizer_config.json+4-1