家人们最近在学大模型!本地部署完chatglm-6b-int 执行下面的代码:
tokenizer = AutoTokenizer.from_pretrained(r"E:/dmx/ChatGLM-6B/THUDM/chatglm-6b-int4",trust_remote_code=True)
# model = AutoModel.from_pretrained("./ChatGLM-6B/THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
model = AutoModel.from_pretrained(r"E:/dmx/ChatGLM-6B/THUDM/chatglm-6b-int4",trust_remote_code=True).float()
报的异常信息:
D:\anaconda3\python.exe E:/dmx/dmx_01/finance_classify.py
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "E:\dmx\dmx_01\finance_classify.py", line 62, in <module>
tokenizer = AutoTokenizer.from_pretrained(r"E:/dmx/ChatGLM-6B/THUDM/chatglm-6b-int4",trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyz\AppData\Roaming\Python\Python311\site-packages\transformers\models\auto\tokenization_auto.py", line 663, in from_pretrained
tokenizer_class = get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyz\AppData\Roaming\Python\Python311\site-packages\transformers\dynamic_module_utils.py", line 388, in get_class_from_dynamic_module
final_module = get_cached_module_file(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\wyz\AppData\Roaming\Python\Python311\site-packages\transformers\dynamic_module_utils.py", line 273, in get_cached_module_file
create_dynamic_module(full_submodule)
File "C:\Users\wyz\AppData\Roaming\Python\Python311\site-packages\transformers\dynamic_module_utils.py", line 59, in create_dynamic_module
os.makedirs(dynamic_module_path, exist_ok=True)
File "<frozen os>", line 215, in makedirs
File "<frozen os>", line 215, in makedirs
File "<frozen os>", line 215, in makedirs
[Previous line repeated 1 more time]
File "<frozen os>", line 225, in makedirs
OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: 'C:\\Users\\zwv\\.cache\\huggingface\\modules\\transformers_modules\\E:'
有没有知道的家人们解答一下!感激不尽!