更改了一些注释

This commit is contained in:
Alpha
2023-12-04 12:51:41 +08:00
parent 0cd3274d04
commit b0c627909a
2 changed files with 3 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ class GetQwenLMHandle(LocalLLMHandle):
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation import GenerationConfig
with ProxyNetworkActivate('Download_LLM'):
model_id = get_conf('QWEN_MODEL_SELECTION') #在这里更改路径如果你已经下载好了的话同时别忘记tokenizer
model_id = get_conf('QWEN_MODEL_SELECTION')
self._tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True, resume_download=True)
# use fp16
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True).eval()