🚀 全球表现卓越的Gemma模型
本模型使用OpenChat的C - RLFT在openchat - 3.5 - 0106数据上进行训练。其性能与基于Mistral的openchat相近,且远优于Gemma - 7b和Gemma - 7b - it。
详情请参考 openchat - 3.5 - 0106。
⚠️ 重要提示
6T预训练令牌 + 0.003初始标准差 + C - RLFT是成功的秘诀?
💡 使用建议
@Google团队,我们知道你们的模型很棒,但请使用像Mistral(甚至Phi和Orca)那样经OSI批准的许可证。
✨ 主要特性
基准测试
模型 |
参数数量 |
平均得分 |
MT - Bench |
HumanEval |
BBH MC |
AGIEval |
TruthfulQA |
MMLU |
GSM8K |
BBH CoT |
OpenChat - 3.5 - 0106 Gemma |
7B |
64.4 |
7.83 |
67.7 |
52.7 |
50.2 |
55.4 |
65.7 |
81.5 |
63.7 |
OpenChat - 3.5 - 0106 Mistral |
7B |
64.5 |
7.8 |
71.3 |
51.5 |
49.1 |
61.0 |
65.8 |
77.4 |
62.2 |
ChatGPT (March) |
???B |
61.5 |
7.94 |
48.1 |
47.6 |
47.1 |
57.7 |
67.3 |
74.9 |
70.1 |
|
|
|
|
|
|
|
|
|
|
|
Gemma - 7B |
7B |
- |
- |
32.3 |
- |
41.7 |
- |
64.3 |
46.4 |
- |
Gemma - 7B - it * |
7B |
25.4 |
- |
28.0 |
38.4 |
32.5 |
34.1 |
26.5 |
10.8 |
7.6 |
OpenHermes 2.5 |
7B |
59.3 |
7.54 |
48.2 |
49.4 |
46.5 |
57.5 |
63.8 |
73.5 |
59.9 |
*: Gemma - 7b - it
无法理解和遵循大多数少样本模板。
🚀 快速开始
使用方法
要使用此模型,我们强烈建议按照我们仓库中的 安装指南 安装OpenChat包,并通过运行下表中的服务命令来使用与OpenAI兼容的OpenChat API服务器。该服务器使用 vLLM 进行了高吞吐量部署优化,并且可以在具有24GB内存的消费级GPU上运行。要启用张量并行,请在服务命令后附加 --tensor - parallel - size N
。
服务器启动后,会在 localhost:18888
监听请求,并且与 OpenAI ChatCompletion API规范 兼容。请参考以下示例请求。此外,你可以使用 OpenChat Web UI 获得更友好的用户体验。
如果你想将服务器部署为在线服务,可以使用 --api - keys sk - KEY1 sk - KEY2 ...
来指定允许的API密钥,并使用 --disable - log - requests --disable - log - stats --log - file openchat.log
仅将日志记录到文件中。出于安全考虑,我们建议在服务器前使用 [HTTPS网关](https://fastapi.tiangolo.com/es/deployment/concepts/#security - https)。
模型 |
大小 |
上下文 |
权重 |
服务命令 |
OpenChat - 3.5 - 0106 - Gemma |
7B |
8192 |
Huggingface |
python -m ochat.serving.openai_api_server --model openchat/openchat-3.5-0106-gemma --engine-use-ray --worker-use-ray |
示例请求(点击展开)
curl http://localhost:18888/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "openchat_3.5_gemma_new",
"messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}]
}'
对话模板
⚠️ 重要提示
这与Mistral版本不同。现在的结束符是 <end_of_turn>
(Mistral版本是 <|end_of_turn|>
)。请记得将 <end_of_turn>
设置为生成结束标记。
GPT4 Correct User: Hello<end_of_turn>GPT4 Correct Assistant: Hi<end_of_turn>GPT4 Correct User: How are you today?<end_of_turn>GPT4 Correct Assistant:
包含系统消息(不建议,可能会降低性能)
You are a helpful assistant.<end_of_turn>GPT4 Correct User: Hello<end_of_turn>GPT4 Correct Assistant: Hi<end_of_turn>GPT4 Correct User: How are you today?<end_of_turn>GPT4 Correct Assistant:
虚假信息生成问题
OpenChat有时可能会生成不存在或不准确的信息,即所谓的“幻觉”。用户应意识到这种可能性,并对从模型获取的任何关键信息进行核实。
安全问题
OpenChat有时可能会生成有害、仇恨言论、有偏见的回复,或回答不安全的问题。在需要安全和经过审核回复的用例中,应用额外的AI安全措施至关重要。
📄 许可证
我们的OpenChat 3.5代码和模型遵循Apache License 2.0进行分发。
📚 引用信息
@article{wang2023openchat,
title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data},
author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang},
journal={arXiv preprint arXiv:2309.11235},
year={2023}
}
💌 联系方式
项目负责人:
- 王观 [imonenext at gmail dot com]
- Alpay Ariyak [aariyak at wpi dot edu]