This commit is contained in:
guanjihuan 2024-01-29 14:43:21 +08:00
parent 468d58f2f2
commit 90d77d4880
2 changed files with 3 additions and 5 deletions

View File

@ -102,11 +102,9 @@ pip install --upgrade s3fs aiobotocore botocore
InternLM 主页https://github.com/InternLM/InternLM 。运行代码时,需要调用其中的 tools 文件夹。
internlm-chat-7b 模型文件下载https://huggingface.co/internlm/internlm-chat-7b ,放在 internlm/internlm-chat-7b 目录下。
internlm-chat-7b 模型文件下载https://huggingface.co/internlm/internlm-chat-7b ,放在 internlm/internlm-chat-7b 目录下。说明:提供的代码是加载 internlm-chat-7b 模型, 目前已经有 internlm2-chat-7b 模型但个人还未测试。internlm2-chat-7b 模型文件下载https://huggingface.co/internlm/internlm2-chat-7b
说明:提供的代码是加载 internlm-chat-7b 模型, 目前已经有 internlm2-chat-7b 模型但个人还未测试。internlm2-chat-7b 模型文件下载https://huggingface.co/internlm/internlm2-chat-7b
显存要求:大概需要 7B 的显存。
显存要求:大概需要 7G 的显存。
运行命令:

View File

@ -11,7 +11,7 @@ st.set_page_config(
@st.cache_resource
def load_model_internlm_7B():
# internlm需要 7B 显存)
# internlm需要 7G 显存)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
nf4_config = BitsAndBytesConfig(