🚀 大模型 magnum-v3-27b-kto
这是一系列旨在复制Claude 3模型(特别是Sonnet和Opus)散文质量的模型中的第12个。该模型是在一次SFT运行基础上进行多次KTO运行的结果,所有这些都发布在anthracite-forge上。

🚀 快速开始
本模型基于IntervitensInc/gemma-2-27b-chatml
(即支持ChatML格式的gemma-2-27b)进行微调。若想使用此模型,可参考以下内容了解其方法、模型选择、提示格式等信息。
✨ 主要特性
- 旨在复制Claude 3模型(如Sonnet和Opus)的散文质量。
- 经过多次KTO运行和一次SFT运行得到,综合了各模型的优势。
- 支持ChatML格式的提示输入。
📚 详细文档
方法
R1(SFT)是在IntervitensInc/gemma-2-27b-chatml
(支持ChatML格式的gemma-2-27b)基础上进行微调的。我们对各种SFT和KTO重新运行、比率和合并方法进行了实验,该模型是综合各模型优点后的最优选择。如果你想自定义KTO运行的组合,或者单独使用SFT,可参考模型部分和anthracite-forge,其中部分exl-quants已预先包含。
模型
提示格式
模型使用ChatML格式进行指令微调。典型的输入如下:
"""<|im_start|>system
system prompt<|im_end|>
<|im_start|>user
Hi there!<|im_end|>
<|im_start|>assistant
Nice to meet you!<|im_end|>
<|im_start|>user
Can I ask a question?<|im_end|>
<|im_start|>assistant
"""
SillyTavern模板
以下是SillyTavern中使用的指令和上下文模板:
上下文模板
{
"story_string": "<|im_start|>system\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}<|im_end|>\n",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true,
"trim_sentences": false,
"include_newline": false,
"single_line": false,
"name": "Magnum ChatML"
}
指令模板
{
"system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.",
"input_sequence": "<|im_start|>user\n",
"output_sequence": "<|im_start|>assistant\n",
"last_output_sequence": "",
"system_sequence": "<|im_start|>system\n",
"stop_sequence": "<|im_end|>",
"wrap": false,
"macro": true,
"names": true,
"names_force_groups": true,
"activation_regex": "",
"system_sequence_prefix": "",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>\n",
"input_suffix": "<|im_end|>\n",
"system_suffix": "<|im_end|>\n",
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"name": "Magnum ChatML"
}
配置
base_model: IntervitensInc/gemma-2-27b-chatml
dtype: float32
merge_method: task_arithmetic
models:
- model: IntervitensInc/gemma-2-27b-chatml
- model: anthracite-forge/magnum-v3-27b-KTO-e0.25-r1
parameters:
weight: 0.5
- model: anthracite-forge/magnum-v3-27b-KTO-e1-r2
parameters:
weight: 0.1
- model: anthracite-forge/magnum-v3-27b-kto-r3
parameters:
weight: 0.4
致谢
我们感谢Recursal / Featherless为本次训练提供计算资源。自第一代72B模型起,Featherless就为我们的Magnum模型提供托管服务,让数千人能够使用我们的模型,助力我们不断发展。同时,感谢Anthracite的所有成员,是他们让这次微调成为可能。
数据集
r1包含以下数据集:
datasets:
- path: anthracite-org/stheno-filtered-v1.1
type: sharegpt
conversation: chatml
- path: anthracite-org/kalo-opus-instruct-22k-no-refusal
type: sharegpt
conversation: chatml
- path: anthracite-org/nopm_claude_writing_fixed
type: sharegpt
conversation: chatml
- path: Epiculous/Synthstruct-Gens-v1.1-Filtered-n-Cleaned
type: sharegpt
conversation: chatml
- path: Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned
type: sharegpt
conversation: chatml
训练
训练进行了2个epoch。我们使用了8块由Recursal AI / Featherless AI慷慨提供的H100s GPU对模型进行全参数微调。

安全
...
详细结果可查看此处
指标 |
值 |
平均值 |
28.90 |
IFEval (0-Shot) |
56.75 |
BBH (3-Shot) |
41.16 |
MATH Lvl 5 (4-Shot) |
15.48 |
GPQA (0-shot) |
14.09 |
MuSR (0-shot) |
9.92 |
MMLU-PRO (5-shot) |
35.98 |
📄 许可证
许可证信息:gemma