Views
No views yet
| C-Eval | MMLU | CMMLU | |
|---|---|---|---|
| GPT-4 | 69.9 | 83 | 71 |
| ChatGPT | 52.5 | 69.1 | 53.9 |
| Claude-1 | 52 | 65.7 | - |
| TigerBot-70B-Chat-V2 | 57.7 | 65.9 | 59.9 |
| WeMix-LLaMA2-70B | 55.2 | 71.3 | 56 |
| LLaMA-2-70B-Chat | 44.3 | 63.8 | 43.3 |
| Qwen-14B-Chat | 71.7 | 66.4 | 70 |
| Baichuan2-13B-Chat | 56.7 | 57 | 58.4 |
| OrionStar-Yi-34B-Chat | 77.71 | 78.32 | 73.52 |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from transformers.generation.utils import GenerationConfig
4
5tokenizer = AutoTokenizer.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat", use_fast=False, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat", device_map="auto",
7 torch_dtype=torch.bfloat16, trust_remote_code=True)
8
9model.generation_config = GenerationConfig.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat")
10messages = [{"role": "user", "content": "你好! 你叫什么名字!"}]
11response = model.chat(tokenizer, messages, streaming=False)
12print(response)
13
14# 你好,我的名字叫聚言,很高兴见到你。device_map='auto'
,会使用所有可用显卡。如需指定使用的设备,可以使用类似 export CUDA_VISIBLE_DEVICES=0,1(使用了0、1号显卡)的方式控制。python cli_demo.py python text_generation.py --model OrionStarAI/OrionStar-Yi-34B-Chat --tokenizer OrionStarAI/OrionStar-Yi-34B-Chat --prompt 你好,你叫什么名字 用户:你好,你叫什么名字
OrionStar-Yi-34B:你好,我的名字叫聚言,很高兴见到你。
用户:你有哪些功能
OrionStar-Yi-34B:我是一个多才多艺的AI助手,我可以回答你的问题、陪你聊天、帮你查询信息、提供生活建议等等。
用户:讲个笑话
OrionStar-Yi-34B:为什么香肠总是不开心?因为它没有朋友,只能被夹在面包里。用户:鸡和兔在一个笼子里,共有26个头,68只脚,那么鸡有多少只,兔有多少只?
OrionStar-Yi-34B:设鸡的数量为x,兔的数量为y。
根据题意,可得出以下两个方程:
x + y = 26 (共有26个头)
2x + 4y = 68 (共有68只脚)
将第一个方程变形,得到y = 26 - x
将y的值代入第二个方程中,得到:
2x + 4(26-x) = 68
解这个方程,得到x = 18
所以,鸡有18只,兔有26 - 18 = 8只。
