模型概述
模型特點
模型能力
使用案例
🚀 海豚 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 在內的多個模型生成的數據進行訓練。



