Этот код напрямую вставлен со страницы веб-сайта HuggingFace на DeepSeek и должен быть код подключаемой и игры: < /p>
Код: Выделить всё
from transformers import pipeline
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1", >trust_remote_code=True)
pipe(messages)
< /code>
< /blockquote>
Но я не могу загрузить модель. Когда я это сделаю, я получаю эту проблему: < /p>
File "/site-packages/transformers/quantizers/auto.py", line 97, in from_dict
raise ValueError(
ValueError: Unknown quantization type, got fp8 - supported types are:
['awq', 'bitsandbytes_4bit', 'bitsandbytes_8bit', 'gptq', 'aqlm', 'quanto', 'eetq',
'hqq', 'compressed-tensors', 'fbgemm_fp8', 'torchao', 'bitnet']
< /code>
Я попробовал другой код: < /p>
import torch
generate_text = pipeline(model="deepseek-ai/DeepSeek-R1",torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
generate_text(messages)
raise ValueError( ValueError: Unknown quantization type, got fp8 - supported types are: ['awq', 'bitsandbytes_4bit', 'bitsandbytes_8bit', 'gptq', 'aqlm', 'quanto', 'eetq', «Хиггс», «hqq», «сжатые стендоры», 'fbgemm_fp8', 'torchao', 'bitnet', 'vptq']
Что я могу сделать?>
Подробнее здесь: https://stackoverflow.com/questions/794 ... tization-t