Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Season2.step_into_llm/01.ChatGLM/mindnlp_chatglm-6b.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
"outputs": [],
"source": [
"%%capture captured_output\n",
"pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.4.10/MindSpore/unified/aarch64/mindspore-2.4.10-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple\n",
"!pip install mindnlp"
"!pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.6.0/MindSpore/unified/aarch64/mindspore-2.6.0-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple\n",
"!pip install mindnlp==0.4.1"
]
},
{
Expand Down Expand Up @@ -302,7 +302,8 @@
}
],
"source": [
"!pip install gradio mdtex2html -i https://pypi.tuna.tsinghua.edu.cn/simple\n",
"!pip install mdtex2html -i https://pypi.tuna.tsinghua.edu.cn/simple\n",
"!pip install gradio==3.50.2 -i https://pypi.tuna.tsinghua.edu.cn/simple\n",
"!pip install ipywidgets -i https://pypi.tuna.tsinghua.edu.cn/simple"
]
},
Expand Down Expand Up @@ -611,9 +612,9 @@
"# Ascend平台请取消以下注释,使用动态图模式\n",
"mindspore.set_context(mode=mindspore.context.PYNATIVE_MODE,device_target='Ascend')\n",
"\n",
"model = AutoModelForSeq2SeqLM.from_pretrained('MindSpore-Lab/ChatGLM-6B', mirror=\"modelers\").half()\n",
"model = AutoModelForSeq2SeqLM.from_pretrained('ZhipuAI/ChatGLM-6B', mirror=\"modelscope\").half()\n",
"model.set_train(False)\n",
"tokenizer = AutoTokenizer.from_pretrained('MindSpore-Lab/ChatGLM-6B', mirror=\"modelers\")"
"tokenizer = AutoTokenizer.from_pretrained('ZhipuAI/ChatGLM-6B', mirror=\"modelscope\")"
]
},
{
Expand Down