You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = ".\\models\\llama3.1-8b-instruct-dpo-zh"
filename = "llama3.1_8b_chinese_chat_q4_k_m-shareAI.gguf"
tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename)
运行后报错:
Traceback (most recent call last):
...
File "chat.py", line 75, in load_model
model = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\work\work_py\ENVS\Qwen\Lib\site-packages\transformers\models\auto\auto_factory.py", line 564, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\work\work_py\ENVS\Qwen\Lib\site-packages\transformers\modeling_utils.py", line 3963, in from_pretrained
) = cls._load_pretrained_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\work\work_py\ENVS\Qwen\Lib\site-packages\transformers\modeling_utils.py", line 4092, in _load_pretrained_model
is_safetensors = archive_file.endswith(".safetensors")
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'
The text was updated successfully, but these errors were encountered:
我想使用int4,发现只有gguf的。然后我下载了
llama3.1_8b_chinese_chat_q4_k_m-shareAI.gguf
。从这里下载的:https://hf-mirror.com/shareAI/llama3.1-8b-instruct-dpo-zh
然后使用transformers。
运行后报错:
The text was updated successfully, but these errors were encountered: