deepseek-ai / deepseek-ai/DeepSeek-OCR
getting error trying transformer inference
- Dominant language
- Python
- Stars
- 23.9k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
[/tmp/ipython-input-2273132955.py](https://localhost:8080/#) in ()
5 model_name = 'deepseek-ai/DeepSeek-OCR'
6
----> 7 tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
8 model = AutoModel.from_pretrained(model_name, _attn_implementation='flash_attention_2', trust_remote_code=True, use_safetensors=True)
9 model = model.eval().cuda().to(torch.bfloat16)
4 frames
[/usr/local/lib/python3.12/dist-packages/transformers/tokenization_utils_fast.py](https://localhost:8080/#) in __init__(self, *args, **kwargs)
109 elif fast_tokenizer_file is not None and not from_slow:
110 # We have a serialization from tokenizers which let us directly build the backend
--> 111 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
112 elif slow_tokenizer is not None:
113 # We need to convert a slow tokenizer to build the backend
Exception: data did not match any variant of untagged enum ModelWrapper at line 646553 column 3
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.