huolongguo10 commited on
Commit
4d9c77c
1 Parent(s): e832744

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -36
app.py CHANGED
@@ -9,7 +9,7 @@ model = T5ForConditionalGeneration.from_pretrained("ClueAI/ChatYuan-large-v2")
9
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
10
  model.to(device)
11
 
12
- base_info = "用户:你是谁?\n小元:我是元语智能公司研发的AI智能助手, 在不违反原则的情况下,我可以回答你的任何问题。\n"
13
  def preprocess(text):
14
  text = f"{base_info}{text}"
15
  text = text.replace("\n", "\\n").replace("\t", "\\t")
@@ -164,41 +164,7 @@ with block as demo_1:
164
 
165
  block = gr.Blocks()
166
  with block as introduction:
167
- gr.Markdown("""<h1><center>元语智能——ChatYuan</center></h1>
168
-
169
- <font size=4>😉ChatYuan: 元语功能型对话大模型 | General Model for Dialogue with ChatYuan
170
- <br>
171
- 👏ChatYuan-large-v2是一个支持中英双语的功能型对话语言大模型,是继ChatYuan系列中ChatYuan-large-v1开源后的又一个开源模型。ChatYuan-large-v2使用了和 v1版本相同的技术方案,在微调数据、人类反馈强化学习、思维链等方面进行了优化。
172
- <br>
173
- ChatYuan large v2 is an open-source large language model for dialogue, supports both Chinese and English languages, and in ChatGPT style.
174
- <br>
175
- ChatYuan-large-v2是ChatYuan系列中以轻量化实现高质量效果的模型之一,用户可以在消费级显卡、 PC甚至手机上进行推理(INT4 最低只需 400M )。
176
- <br>
177
- 在Chatyuan-large-v1的原有功能的基础上,我们给模型进行了如下优化:
178
- - 新增了中英双语对话能力。
179
- - 新增了拒答能力。对于一些危险、有害的问题,学会了拒答处理。
180
- - 新增了代码生成功能。对于基础代码生成进行了一定程度优化。
181
- - 增强了基础能力。原有上下文问答、创意性写作能力明显提升。
182
- - 新增了表格生成功能。使生成的表格内容和格式更适配。
183
- - 增强了基础数学运算能力。
184
- - 最大长度token数扩展到4096。
185
- - 增强了模拟情景能力。.<br>
186
- <br>
187
- Based on the original functions of Chatyuan-large-v1, we optimized the model as follows:
188
- -Added the ability to speak in both Chinese and English.
189
- -Added the ability to refuse to answer. Learn to refuse to answer some dangerous and harmful questions.
190
- -Added code generation functionality. Basic code generation has been optimized to a certain extent.
191
- -Enhanced basic capabilities. The original contextual Q&A and creative writing skills have significantly improved.
192
- -Added a table generation function. Make the generated table content and format more appropriate.
193
- -Enhanced basic mathematical computing capabilities.
194
- -The maximum number of length tokens has been expanded to 4096.
195
- -Enhanced ability to simulate scenarios< br>
196
- <br>
197
- 👀<a href='https://www.cluebenchmarks.com/clueai.html'>PromptCLUE-large</a>在1000亿token中文语料上预训练, 累计学习1.5万亿中文token, 并且在数百种任务上进行Prompt任务式训练. 针对理解类任务, 如分类、情感分析、抽取等, 可以自定义标签体系; 针对多种生成任务, 可以进行采样自由生成. <br>
198
- <br>
199
- &nbsp; <a href='https://modelscope.cn/models/ClueAI/ChatYuan-large/summary' target="_blank">ModelScope</a> &nbsp; | &nbsp; <a href='https://huggingface.co/ClueAI/ChatYuan-large-v1' target="_blank">Huggingface</a> &nbsp; | &nbsp; <a href='https://www.clueai.cn' target="_blank">官网体验场</a> &nbsp; | &nbsp; <a href='https://github.com/clue-ai/clueai-python#ChatYuan%E5%8A%9F%E8%83%BD%E5%AF%B9%E8%AF%9D' target="_blank">ChatYuan-API</a> &nbsp; | &nbsp; <a href='https://github.com/clue-ai/ChatYuan' target="_blank">Github项目地址</a> &nbsp; | &nbsp; <a href='https://openi.pcl.ac.cn/ChatYuan/ChatYuan/src/branch/main/Fine_tuning_ChatYuan_large_with_pCLUE.ipynb' target="_blank">OpenI免费试用</a> &nbsp;
200
- </font>
201
- <center><a href="https://clustrmaps.com/site/1bts0" title="Visit tracker"><img src="//www.clustrmaps.com/map_v2.png?d=ycVCe17noTYFDs30w7AmkFaE-TwabMBukDP1802_Lts&cl=ffffff" /></a></center>
202
  """)
203
 
204
 
 
9
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
10
  model.to(device)
11
 
12
+ base_info = "用户:你是谁?\n小元:我是元语智能公司研发的AI智能助手(zz鱼运行), 在不违反原则的情况下,我可以回答你的任何问题。\n"
13
  def preprocess(text):
14
  text = f"{base_info}{text}"
15
  text = text.replace("\n", "\\n").replace("\t", "\\t")
 
164
 
165
  block = gr.Blocks()
166
  with block as introduction:
167
+ gr.Markdown("""啥也没有
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  """)
169
 
170