System Info
transformers version: 4.33.2
- Platform: Linux-5.15.0-82-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.16.4
- Safetensors version: 0.3.3
- Accelerate version: 0.22.0
- Accelerate config: not found
- PyTorch version (GPU?): 2.0.1+cu117 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no
Who can help?
@ArthurZucker
Information
Tasks
Reproduction
A simple reproduce:
from transformers import AutoTokenizer
t_fast = AutoTokenizer.from_pretrained("codellama/codellama-7B-Instruct-Hf", use_fast=True)
t_slow = AutoTokenizer.from_pretrained("codellama/codellama-7B-Instruct-Hf", use_fast=False)
ids_fast = t_fast.encode("<s>[INST]", add_special_tokens=False)
ids_slow = t_slow.encode("<s>[INST]", add_special_tokens=False)
assert ids_fast == ids_slow, f"Fast: {ids_fast}, Slow: {ids_slow}"
# AssertionError: Fast: [1, 518, 25580, 29962], Slow: [1, 25580, 29962]
Expected behavior
I'm not sure which one is correct. Actually decoding the fast tokenizer outputs will get '<s> [INST]', while the slow tokenizer '<s>INST]', both not same as the original string.
System Info
transformersversion: 4.33.2Who can help?
@ArthurZucker
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
A simple reproduce:
Expected behavior
I'm not sure which one is correct. Actually decoding the fast tokenizer outputs will get
'<s> [INST]', while the slow tokenizer'<s>INST]', both not same as the original string.