🚀 全球表現卓越的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]