update server

This commit is contained in:
LiangSong 2023-04-02 21:51:32 +08:00
parent 3d0d4e8af7
commit 9857ad03f1

View File

@ -32,10 +32,7 @@ raw_model = LlamaForCausalLM(
shared_input_output_embedding=True, shared_input_output_embedding=True,
) )
) )
ckpt = torch.load( ckpt = torch.load("data/saved_ckpt/instruction_tuning/14001.pt", map_location="cpu")
"data/saved_ckpt/instruction_tuning/14001.pt",
map_location="cpu",
)
raw_model.load_state_dict(ckpt) raw_model.load_state_dict(ckpt)
raw_model.eval() raw_model.eval()
model = raw_model.cuda() model = raw_model.cuda()
@ -68,10 +65,8 @@ demo = gr.Interface(
"Can you explain to me what quantum mechanics is and how it relates to quantum computing?", "Can you explain to me what quantum mechanics is and how it relates to quantum computing?",
"I'm feeling a bit unwell in my stomach today. Do you have any suggestions for dinner?", "I'm feeling a bit unwell in my stomach today. Do you have any suggestions for dinner?",
], ],
).queue(
concurrency_count=1,
title="Open-Llama", title="Open-Llama",
description="不基于其他预训练模型,完全使用Open-Llama项目从0开始训练的Instruct-GPT模型总共训练花费在2w美元以内训练时间80h", description="不基于其他预训练模型,完全使用[Open-Llama](https://github.com/Bayes-Song/Open-Llama)项目从0开始训练的Instruct-GPT模型总训练成本不超过2w美元。由于请求需要经Gradio进行转发可能出现请求丢失的现象当长时间无响应如20s以上可刷新重试。当前体验服务生成的所有内容都是由人工智能模型生成我们对其生成内容的准确性、完整性和功能性不做任何保证并且其生成的内容不代表我们的态度或观点。",
article="[关于作者](http://home.ustc.edu.cn/~sl9292/resume.html)", article="[关于作者](http://home.ustc.edu.cn/~sl9292/resume.html)",
) ).queue(concurrency_count=1)
demo.launch(share=True) demo.launch(share=True)