mirror of https://github.com/InternLM/InternLM
update web demo
parent
e71fbcc3b5
commit
34f2f5aa96
|
@ -161,11 +161,11 @@ def on_btn_click():
|
||||||
@st.cache_resource
|
@st.cache_resource
|
||||||
def load_model():
|
def load_model():
|
||||||
model = (
|
model = (
|
||||||
AutoModelForCausalLM.from_pretrained("/mnt/inspurfs/share_data/zhangwenwei/models/hf_release/internlm2-chat-7b", trust_remote_code=True)
|
AutoModelForCausalLM.from_pretrained("internlm/internlm2-chat-7b", trust_remote_code=True)
|
||||||
.to(torch.bfloat16)
|
.to(torch.bfloat16)
|
||||||
.cuda()
|
.cuda()
|
||||||
)
|
)
|
||||||
tokenizer = AutoTokenizer.from_pretrained("/mnt/inspurfs/share_data/zhangwenwei/models/hf_release/internlm2-chat-7b", trust_remote_code=True)
|
tokenizer = AutoTokenizer.from_pretrained("internlm/internlm2-chat-7b", trust_remote_code=True)
|
||||||
return model, tokenizer
|
return model, tokenizer
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue