Skip to content

Commit

Permalink
Update GithubAction+ChatGLM+Moss
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed May 7, 2023
1 parent 68bdec1 commit aed1b20
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions docs/GithubAction+ChatGLM+Moss
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ RUN python3 -m pip install -r request_llm/requirements_moss.txt
RUN python3 -m pip install -r request_llm/requirements_chatglm.txt
RUN python3 -m pip install -r request_llm/requirements_newbing.txt

# 预热CHATGLM参数(非必要 可选步骤)
RUN echo ' \n\
from transformers import AutoModel, AutoTokenizer \n\
chatglm_tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True) \n\
chatglm_model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).float() ' >> warm_up_chatglm.py
RUN python3 -u warm_up_chatglm.py

# 禁用缓存,确保更新代码
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
RUN git pull
# # 预热CHATGLM参数(非必要 可选步骤)
# RUN echo ' \n\
# from transformers import AutoModel, AutoTokenizer \n\
# chatglm_tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True) \n\
# chatglm_model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).float() ' >> warm_up_chatglm.py
# RUN python3 -u warm_up_chatglm.py

# 预热Tiktoken模块
RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()'
Expand Down

0 comments on commit aed1b20

Please sign in to comment.