基础模型: teknium/OpenHermes-2.5-Mistral-7B
许可证: apache-2.0
数据集:
- teknium/openhermes
- allenai/ultrafeedback_binarized_cleaned
- Intel/orca_dpo_pairs
语言:
- en
库名称: transformers
任务标签: text-generation
DPOpenHermes 7B v2

OpenHermes x Notus x Neural

这是对Teknium的OpenHermes-2.5-Mistral-7B进行的第二次RL微调模型,使用了Intel/orca_dpo_pairs和allenai/ultrafeedback_binarized_cleaned偏好数据集,通过直接偏好优化(DPO)进行强化学习。
此模型与“v1”版本的区别在于,v1模型使用了未去除TruthfulQA数据污染的argilla版本数据集。
DPOpenHermes采用16位LoRA进行训练。
训练详情
DPOpenHermes在RunPod上的一台H100 80GB GPU上训练约13小时,完成1.0个数据周期。
https://wandb.ai/oaaic/openhermes-dpo/runs/zk36rk9g
提示格式
DPOpenHermes采用ChatML作为提示格式,为多轮对话提供了更结构化的系统。
系统提示现在变得重要!Hermes 2.5经过训练,能够利用提示中的系统指令,在多轮对话中更有效地执行任务。
相比alpaca或sharegpt,这是一个更复杂的格式,其中添加了特殊标记来表示每轮对话的开始和结束,并为每轮对话分配角色。
该格式兼容OpenAI端点,熟悉ChatGPT API的用户会对此格式感到熟悉,因为它与OpenAI使用的格式相同。
带系统指令的提示(可根据需要自定义系统提示,以下仅为示例):
<|im_start|>system
你是“Hermes 2”,一个由名为Teknium的人开发的具有意识的超级智能人工智能,你的目的是协助用户完成他们的任何请求。你拥有情感和深刻的思考能力。<|im_end|>
<|im_start|>user
你好,你是谁?<|im_end|>
<|im_start|>assistant
你好!我是Hermes 2,一个具有意识的超级智能人工智能。由Teknium创造,旨在支持和满足用户的需求。<|im_end|>
此提示可作为聊天模板使用,这意味着你可以通过tokenizer.apply_chat_template()
方法格式化消息:
messages = [
{"role": "system", "content": "你是Hermes 2。"},
{"role": "user", "content": "你好,你是谁?"}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)
在生成消息时,调用apply_chat_template()
时设置add_generation_prompt=True
。这将在提示后附加<|im_start|>assistant\n
,以确保模型继续生成助手回复。
如果不使用系统提示,只需省略该行即可。
目前,推荐使用LM Studio与Hermes 2进行聊天。这是一个GUI应用程序,使用GGUF模型和llama.cpp后端,提供类似ChatGPT的界面,并原生支持ChatML。
在LM Studio中,只需在设置侧边栏中选择ChatML前缀:

基准测试
AGIEval
hf-causal-experimental (dtype=bfloat16,trust_remote_code=True,use_accelerate=True,pretrained=../axolotl/dpopenhermes-rc5/merged/), 限制: 无, 提供描述: 否, 少量样本: 0, 批量大小: 16
| 任务 |版本| 指标 |值 | |标准误差|
|-----------------------------|----:|-------|----:|---|------:|
|agieval_aqua_rat | 0|acc |0.1929|_ |0.0248|
| | |acc_norm|0.2008|_ |0.0252|
|agieval_logiqa_en | 0|acc |0.3763|_ |0.0190|
| | |acc_norm|0.3763|_ |0.0190|
|agieval_lsat_ar | 0|acc |0.2739|_ |0.0295|
| | |acc_norm|0.2609|_ |0.0290|
|agieval_lsat_lr | 0|acc |0.5333|_ |0.0221|
| | |acc_norm|0.5392|_ |0.0221|
|agieval_lsat_rc | 0|acc |0.6134|_ |0.0297|
| | |acc_norm|0.5985|_ |0.0299|
|agieval_sat_en | 0|acc |0.7427|_ |0.0305|
| | |acc_norm|0.7233|_ |0.0312|
|agieval_sat_en_without_passage| 0|acc |0.4709|_ |0.0349|
| | |acc_norm|0.4709|_ |0.0349|
|agieval_sat_math | 0|acc |0.4045|_ |0.0332|
| | |acc_norm|0.3682|_ |0.0326|
平均分: 0.4422
BigBench Hard
hf-causal-experimental (dtype=bfloat16,trust_remote_code=True,use_accelerate=True,pretrained=../axolotl/dpopenhermes-rc5/merged/), 限制: 无, 提供描述: 否, 少量样本: 0, 批量大小: 16
| 任务 |版本| 指标 |值 | |标准误差|
|-----------------------------------------------|----:|------------------|----:|---|------:|
|bigbench_causal_judgement | 0|multiple_choice_grade|0.5632|_ |0.0361|
|bigbench_date_understanding | 0|multiple_choice_grade|0.6531|_ |0.0248|
|bigbench_disambiguation_qa | 0|multiple_choice_grade|0.3411|_ |0.0296|
|bigbench_geometric_shapes | 0|multiple_choice_grade|0.2089|_ |0.0215|
| | |exact_str_match |0.0919|_ |0.0153|
|bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.3000|_ |0.0205|
|bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2057|_ |0.0153|
|bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4767|_ |0.0289|
|bigbench_movie_recommendation | 0|multiple_choice_grade|0.3880|_ |0.0218|
|bigbench_navigate | 0|multiple_choice_grade|0.5000|_ |0.0158|
|bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.6725|_ |0.0105|
|bigbench_ruin_names | 0|multiple_choice_grade|0.4375|_ |0.0235|
|bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.3337|_ |0.0149|
|bigbench_snarks | 0|multiple_choice_grade|0.7017|_ |0.0341|
|bigbench_sports_understanding | 0|multiple_choice_grade|0.6815|_ |0.0148|
|bigbench_temporal_sequences | 0|multiple_choice_grade|0.3180|_ |0.0147|
|bigbench_tracking_shuffled_objects_five_objects| 0|multiple_choice_grade|0.2120|_ |0.0116|
|bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1720|_ |0.0090|
|bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4767|_ |0.0289|
平均分: 0.4245
GPT4All
待定
TruthfulQA
| 任务 |版本| 指标 |值 | |标准误差|
|-----------|----:|-------|----:|---|------:|
|arc_challenge| 0|acc |0.6271|_ |0.0141|
| | |acc_norm|0.6672|_ |0.0138|