模型简介
模型特点
模型能力
使用案例
🚀 海豚 2.9 Llama 3 8b 🐬
本模型由 Eric Hartford、Lucas Atkins、Fernando Fernandes 以及 Cognitive Computations 精心挑选数据并完成训练。它以 Llama-3-8b 为基础模型,在多种指令、对话和编码任务中表现出色,还具备初步的智能体能力并支持函数调用。
Discord链接:https://discord.gg/cognitivecomputations
✨ 主要特性
- 多技能表现:具备多种指令处理、对话交流和编码能力。
- 初步智能体能力:拥有初步的智能体能力并支持函数调用。
- 无审查机制:经过数据过滤,去除了对齐和偏差,不过使用时建议自行实现对齐层。
📦 安装指南
文档未提供具体安装步骤,故跳过此章节。
💻 使用示例
基础用法
<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
📚 详细文档
数据集相关
本模型训练使用了以下数据集:
- cognitivecomputations/Dolphin-2.9
- teknium/OpenHermes-2.5
- m-a-p/CodeFeedback-Filtered-Instruction
- cognitivecomputations/dolphin-coder
- cognitivecomputations/samantha-data
- HuggingFaceH4/ultrachat_200k
- microsoft/orca-math-word-problems-200k
- abacusai/SystemChat-1.1
- Locutusque/function-calling-chatml
- internlm/Agent-FLAN
模型相关信息
属性 | 详情 |
---|---|
基础模型 | meta-llama/Meta-Llama-3-8B |
模型类型 | 基于 Llama-3-8b 的微调模型 |
训练数据 | cognitivecomputations/Dolphin-2.9等多个数据集 |
上下文长度 | 基础模型有 8k 上下文,全量微调时使用 4k 序列长度 |
训练耗时 | 在 Crusoe Cloud 提供的 8x L40S 上训练了 2.5 天 |
训练方式 | 对所有参数进行 FFT 训练,使用 ChatML 提示模板格式 |
已知问题及建议
⚠️ 重要提示
在 Dolphin 2.9 数据集的 SystemConversations 中发现了一个 bug,这会导致模型过度提及“系统消息”。为解决此问题,建议在系统消息中添加一条指令,引导模型不要提及系统消息。例如:“The assistant is named Dolphin. A helpful and friendly AI assistant, Dolphin avoids discussing the system message unless directly asked about it.”
💡 使用建议
此模型未经过审查,已对数据集进行过滤以去除对齐和偏差,但这也使得模型可能会高度服从任何请求,包括不道德的请求。在将模型作为服务公开之前,建议自行实现对齐层。请阅读关于无审查模型的博客文章:https://erichartford.com/uncensored-models ,并对使用此模型生成的任何内容负责,谨慎使用。
量化版本
- GGUF:https://huggingface.co/QuantFactory/dolphin-2.9-llama3-8b-GGUF
- 带 imatrix 的 GGUF:https://huggingface.co/bartowski/dolphin-2.9-llama3-8b-GGUF
- Exllamav2:https://huggingface.co/bartowski/dolphin-2.9-llama3-8b-exl2
训练过程
训练超参数
以下是训练过程中使用的超参数:
- 学习率:2e-05
- 训练批次大小:3
- 评估批次大小:3
- 随机种子:42
- 分布式类型:多 GPU
- 设备数量:8
- 梯度累积步数:4
- 总训练批次大小:96
- 总评估批次大小:24
- 优化器:Adam(β1 = 0.9,β2 = 0.999,ε = 1e-08)
- 学习率调度器类型:余弦
- 学习率调度器热身步数:7
- 训练轮数:3
训练结果
训练损失 | 轮数 | 步数 | 验证损失 |
---|---|---|---|
1.146 | 0.0005 | 1 | 1.1064 |
0.6962 | 0.2501 | 555 | 0.6636 |
0.6857 | 0.5001 | 1110 | 0.6503 |
0.6592 | 0.7502 | 1665 | 0.6419 |
0.6465 | 1.0002 | 2220 | 0.6317 |
0.5295 | 1.2395 | 2775 | 0.6408 |
0.5302 | 1.4895 | 3330 | 0.6351 |
0.5188 | 1.7396 | 3885 | 0.6227 |
0.521 | 1.9896 | 4440 | 0.6168 |
0.3968 | 2.2289 | 4995 | 0.6646 |
0.3776 | 2.4789 | 5550 | 0.6619 |
0.3983 | 2.7290 | 6105 | 0.6602 |
框架版本
- Transformers 4.40.0
- Pytorch 2.2.2+cu121
- Datasets 2.18.0
- Tokenizers 0.19.1
Axolotl 配置
查看 axolotl 配置
axolotl 版本:0.4.0
base_model: meta-llama/Meta-Llama-3-8B
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
tokenizer_use_fast: false
load_in_8bit: false
load_in_4bit: false
strict: false
model_config:
datasets:
- path: /workspace/datasets/dolphin-2.9/dolphin201-sharegpt2.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/Ultrachat200kunfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/dolphin-coder-translate-sharegpt2.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/dolphin-coder-codegen-sharegpt2.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/m-a-p_Code-Feedback-sharegpt-unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/m-a-p_CodeFeedback-Filtered-Instruction-sharegpt-unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/not_samantha_norefusals.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/Orca-Math-resort-unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/agent_instruct_react_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/toolbench_instruct_j1s1_3k_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/toolbench_negative_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/toolbench_react_10p_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/toolbench_tflan_cot_30p_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/openhermes200k_unfiltered.jsonl
type: sharegpt
conversation: chatml
- path: /workspace/datasets/dolphin-2.9/SystemConversations.jsonl
type: sharegpt
conversation: chatml
chat_template: chatml
dataset_prepared_path: /workspace/datasets/dolphin-2.9/thingy
val_set_size: 0.0002
output_dir: ./out
sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true
gradient_accumulation_steps: 4
micro_batch_size: 3
num_epochs: 3
logging_steps: 1
optimizer: adamw_8bit
lr_scheduler: cosine
learning_rate: 2e-5
wandb_project: dolphin-2.9-mixtral-8x22b
wandb_watch:
wandb_run_id:
wandb_log_model:
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
saves_per_epoch: 4
save_total_limit: 2
save_steps:
evals_per_epoch: 4
eval_sample_packing: false
debug:
deepspeed: deepspeed_configs/zero3_bf16.json
weight_decay: 0.05
fsdp:
fsdp_config:
special_tokens:
eos_token: "<|im_end|>"
pad_token: "<|end_of_text|>"
tokens:
- "<|im_start|>"
- "<|im_end|>"
📄 许可证
本模型遵循 META LLAMA 3 COMMUNITY LICENSE AGREEMENT。作者允许在符合 Meta 的 Llama-3 许可证的前提下进行任何使用,包括商业用途。此模型使用了包括 GPT4 在内的多个模型生成的数据进行训练。



