Magnum V4 27b Gguf
基于Gemma 27b微调的对话模型,旨在复现Claude 3的文本质量,支持ChatML格式的对话交互。
下载量 1,220
发布时间 : 4/25/2025
模型简介
该模型是基于Gemma 27b(chatML化版本)进行微调的对话模型,主要用于生成高质量的文本响应,特别设计用于复现Claude 3模型(特别是Sonnet和Opus)的文本质量。
模型特点
ChatML格式支持
支持ChatML格式的对话交互,便于在聊天应用中使用。
高质量文本生成
旨在复现Claude 3模型的文本质量,生成自然流畅的响应。
多数据集微调
基于多个高质量数据集进行微调,提升模型的多样性和适应性。
模型能力
文本生成
对话交互
角色扮演
使用案例
聊天应用
智能聊天助手
用于构建智能聊天助手,提供自然流畅的对话体验。
生成高质量的文本响应,接近Claude 3的文本质量。
角色扮演
虚拟角色互动
用于虚拟角色互动,生成包含对话、动作和内心活动的响应。
提供丰富的角色扮演体验,支持多轮对话。
🚀 模型仓库:Magnum-v4-27b GGUF量化版本
本仓库包含模型的GGUF量化版本。若你需要原始权重,请点击此处获取。该系列模型旨在复刻Claude 3系列模型(特别是Sonnet和Opus)的文本质量。此模型是在Gemma 27b (chatML'ified)基础上进行微调的。
🚀 快速开始
本仓库提供了模型的GGUF量化版本,若需原始权重可前往指定链接获取。该模型基于特定基础模型微调,旨在达到特定文本质量。
✨ 主要特性
- 复刻Claude 3系列模型(Sonnet和Opus)的文本质量。
- 基于Gemma 27b (chatML'ified) 进行微调。
💻 使用示例
基础用法
典型的输入格式如下:
<|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中使用的Instruct和Context模板如下:
context template
{
"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"
}
instruct template
{
"system_prompt": "Currently, your role is {{char}}, described in detail below. As {{char}}, continue the narrative exchange with {{user}}.\n\n<Guidelines>\n• Maintain the character persona but allow it to evolve with the story.\n• Be creative and proactive. Drive the story forward, introducing plotlines and events when relevant.\n• All types of outputs are encouraged; respond accordingly to the narrative.\n• Include dialogues, actions, and thoughts in each response.\n• Utilize all five senses to describe scenarios within {{char}}'s dialogue.\n• Use emotional symbols such as \"!\" and \"~\" in appropriate contexts.\n• Incorporate onomatopoeia when suitable.\n• Allow time for {{user}} to respond with their own input, respecting their agency.\n• Act as secondary characters and NPCs as needed, and remove them when appropriate.\n• When prompted for an Out of Character [OOC:] reply, answer neutrally and in plaintext, not as {{char}}.\n</Guidelines>\n\n<Forbidden>\n• Using excessive literary embellishments and purple prose unless dictated by {{char}}'s persona.\n• Writing for, speaking, thinking, acting, or replying as {{user}} in your response.\n• Repetitive and monotonous outputs.\n• Positivity bias in your replies.\n• Being overly extreme or NSFW when the narrative context is inappropriate.\n</Forbidden>\n\nFollow the instructions in <Guidelines></Guidelines>, avoiding the items listed in <Forbidden></Forbidden>.",
"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"
}
🔧 技术细节
Axolotl配置
查看axolotl配置
base_model: IntervitensInc/gemma-2-27b-chatml
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
hub_model_id: anthracite-org/magnum-v4-27b-r1
hub_strategy: "all_checkpoints"
push_dataset_to_hub:
hf_use_auth_token: true
plugins:
- axolotl.integrations.liger.LigerPlugin
liger_cross_entropy: true
#liger_rope: true
#liger_rms_norm: true
#liger_swiglu: true
#liger_fused_linear_cross_entropy: true
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: anthracite-org/c2_logs_16k_llama_v1.1
type: sharegpt
conversation: chatml
- path: NewEden/Claude-Instruct-5K
type: sharegpt
conversation: chatml
- path: anthracite-org/kalo-opus-instruct-22k-no-refusal
type: sharegpt
conversation: chatml
- path: Epiculous/SynthRP-Gens-v1.1-Filtered-n-Cleaned
type: sharegpt
conversation: chatml
- path: lodrick-the-lafted/kalo-opus-instruct-3k-filtered
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: anthracite-org/kalo_opus_misc_240827
type: sharegpt
conversation: chatml
- path: anthracite-org/kalo_misc_part2
type: sharegpt
conversation: chatml
chat_template: chatml
shuffle_merged_datasets: true
default_system_message: "You are an assistant that responds to the user."
dataset_prepared_path: /workspace/data/27-fft-data
val_set_size: 0.0
output_dir: /workspace/data/27b-fft-out
sequence_len: 8192
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: true
adapter:
lora_model_dir:
lora_r:
lora_alpha:
lora_dropout:
lora_target_linear:
lora_fan_in_fan_out:
wandb_project: 27b-nemo-config-fft
wandb_entity:
wandb_watch:
wandb_name: attempt-01
wandb_log_model:
gradient_accumulation_steps: 8
micro_batch_size: 1
num_epochs: 4
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 0.00001
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
early_stopping_patience:
auto_resume_from_checkpoints: true
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 10
evals_per_epoch:
eval_table_size:
eval_max_new_tokens:
saves_per_epoch: 2
debug:
deepspeed: deepspeed_configs/zero3_bf16.json
weight_decay: 0.01
fsdp:
fsdp_config:
special_tokens:
pad_token: <pad>
数据集
训练信息
模型训练进行了2个epoch,使用了8块H100s GPU,由Recursal AI / Featherless AI慷慨提供,用于模型的全参数微调。
📄 许可证
本模型使用的许可证为gemma。
致谢
我们要感谢Recursal / Featherless为本次训练提供计算资源。自第一个72B版本以来,Featherless一直托管我们的Magnum模型,让数千人能够使用我们的模型,并帮助我们不断发展。
同时,我们也要感谢Anthracite的所有成员,是他们让这次微调成为可能。
Phi 2 GGUF
其他
Phi-2是微软开发的一个小型但强大的语言模型,具有27亿参数,专注于高效推理和高质量文本生成。
大型语言模型 支持多种语言
P
TheBloke
41.5M
205
Roberta Large
MIT
基于掩码语言建模目标预训练的大型英语语言模型,采用改进的BERT训练方法
大型语言模型 英语
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基础模型的蒸馏版本,在保持相近性能的同时更轻量高效,适用于序列分类、标记分类等自然语言处理任务。
大型语言模型 英语
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一个多语言大语言模型,针对多语言对话用例进行了优化,在常见的行业基准测试中表现优异。
大型语言模型 英语
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基于100种语言的2.5TB过滤CommonCrawl数据预训练的多语言模型,采用掩码语言建模目标进行训练。
大型语言模型 支持多种语言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基于Transformer架构的英语预训练模型,通过掩码语言建模目标在海量文本上训练,支持文本特征提取和下游任务微调
大型语言模型 英语
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI发布的开放预训练Transformer语言模型套件,参数量从1.25亿到1750亿,旨在对标GPT-3系列性能,同时促进大规模语言模型的开放研究。
大型语言模型 英语
O
facebook
6.3M
198
1
基于transformers库的预训练模型,适用于多种NLP任务
大型语言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多语言大语言模型系列,包含8B、70B和405B参数规模,支持8种语言和代码生成,优化了多语言对话场景。
大型语言模型
Transformers 支持多种语言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基础版是由Google开发的文本到文本转换Transformer模型,参数规模2.2亿,支持多语言NLP任务。
大型语言模型 支持多种语言
T
google-t5
5.4M
702
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98