update
This commit is contained in:
parent
468d58f2f2
commit
90d77d4880
@ -102,11 +102,9 @@ pip install --upgrade s3fs aiobotocore botocore
|
|||||||
|
|
||||||
InternLM 主页:https://github.com/InternLM/InternLM 。运行代码时,需要调用其中的 tools 文件夹。
|
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
|
显存要求:大概需要 7G 的显存。
|
||||||
|
|
||||||
显存要求:大概需要 7B 的显存。
|
|
||||||
|
|
||||||
运行命令:
|
运行命令:
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ st.set_page_config(
|
|||||||
|
|
||||||
@st.cache_resource
|
@st.cache_resource
|
||||||
def load_model_internlm_7B():
|
def load_model_internlm_7B():
|
||||||
# internlm(需要 7B 显存)
|
# internlm(需要 7G 显存)
|
||||||
import torch
|
import torch
|
||||||
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
||||||
nf4_config = BitsAndBytesConfig(
|
nf4_config = BitsAndBytesConfig(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user