-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Description
System Info
transformersversion: 4.34.0- Platform: macOS-13.5-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- Safetensors version: 0.4.0
- Accelerate version: 0.20.3
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.0 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
In [1]: import transformers
In [2]: replitt = transformers.AutoTokenizer.from_pretrained('replit/replit-code-v1-3b', trust_remote_code=True)
...
File ~/.cache/huggingface/modules/transformers_modules/replit/replit-code-v1-3b/cc0a4f17a8d72b71d62ea53cb0e23e4dac352067/replit_lm_tokenizer.py:76, in ReplitLMTokenizer.get_vocab(self)
75 def get_vocab(self):
---> 76 vocab = {self.convert_ids_to_tokens(i): i for i in range(self.vocab_size)}
77 vocab.update(self.added_tokens_encoder)
78 return vocab
File ~/.cache/huggingface/modules/transformers_modules/replit/replit-code-v1-3b/cc0a4f17a8d72b71d62ea53cb0e23e4dac352067/replit_lm_tokenizer.py:73, in ReplitLMTokenizer.vocab_size(self)
71 @Property
72 def vocab_size(self):
---> 73 return self.sp_model.get_piece_size()
AttributeError: 'ReplitLMTokenizer' object has no attribute 'sp_model'
Expected behavior
I don't actually know if it is expected to work or not, but maybe you can advise on the fix.