System Info
transformers version: 4.38.2
- Platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35
- Python version: 3.10.13
- Huggingface_hub version: 0.21.3
- Safetensors version: 0.4.2
- Accelerate version: 0.27.2
- 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?:
- Using distributed or parallel set-up in script?:
With sentencepiece==0.2.0 and protobuf==4.25.3 installed
Who can help?
@ArthurZucker
Information
Tasks
Reproduction
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf", local_files_only=True, add_prefix_space=False)
>>> tokenizer.tokenize("overheard")
['▁over', 'he', 'ard']
Also tried add_dummy_prefix_space=False, the output is still the same.
Expected behavior
The tokenize result should not add prefix space (SPIECE_UNDERLINE)
System Info
transformersversion: 4.38.2With
sentencepiece==0.2.0andprotobuf==4.25.3installedWho can help?
@ArthurZucker
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
Also tried
add_dummy_prefix_space=False, the output is still the same.Expected behavior
The tokenize result should not add prefix space (
SPIECE_UNDERLINE)