🚀 🔬 Einstein-v4-7B
Einstein-v4-7B 是 mistralai/Mistral-7B-v0.1 在多种数据集上进行全量微调后的模型。该模型使用 7xRTX3090
+ 1xRTXA6000
显卡,借助 axolotl 工具进行微调。其训练由 sablo.ai 赞助。

🚀 快速开始
此模型可直接使用,你可以按照以下提示进行操作:
提示模板
你可以在使用模型时使用以下提示模板:
ChatML
<|im_start|>system
{system}<|im_end|>
<|im_start|>user
{user}<|im_end|>
<|im_start|>assistant
{asistant}<|im_end|>
这个提示模板可作为 聊天模板 使用,这意味着你可以使用 tokenizer.apply_chat_template()
方法来格式化消息:
messages = [
{"role": "system", "content": "You are helpful AI asistant."},
{"role": "user", "content": "Hello!"}
]
gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
model.generate(**gen_input)
量化版本
此模型提供了量化版本:
- https://huggingface.co/LoneStriker/Einstein-v4-7B-GGUF
- https://huggingface.co/solidrust/Einstein-v4-7B-AWQ
- https://huggingface.co/bartowski/Einstein-v4-7B-exl2
✨ 主要特性
- 多数据集微调:基于多个科学相关数据集进行微调,在科学问答、推理等任务上表现出色。
- 多种量化版本:提供 GGUF、AWQ、Exl2 等量化版本,方便不同场景使用。
📦 安装指南
文档未提供具体安装步骤,暂不展示。
💻 使用示例
文档未提供具体代码示例,暂不展示。
📚 详细文档
模型信息
属性 |
详情 |
模型类型 |
基于 Mistral-7B-v0.1 全量微调的模型 |
训练数据 |
allenai/ai2_arc、camel-ai/physics、camel-ai/chemistry 等众多数据集 |
评估结果
详细结果可查看 此处
指标 |
值 |
平均 |
66.62 |
AI2 推理挑战 (25 样本) |
64.68 |
HellaSwag (10 样本) |
83.75 |
MMLU (5 样本) |
62.31 |
TruthfulQA (0 样本) |
55.15 |
Winogrande (5 样本) |
76.24 |
GSM8k (5 样本) |
57.62 |
详细结果可查看 此处
指标 |
值 |
平均 |
16.73 |
IFEval (0 样本) |
47.08 |
BBH (3 样本) |
14.30 |
MATH Lvl 5 (4 样本) |
1.74 |
GPQA (0 样本) |
4.25 |
MuSR (0 样本) |
19.02 |
MMLU-PRO (5 样本) |
13.99 |
相关资源
🐦 公告推文
https://twitter.com/Weyaxi/status/1765851433448944125
🔍 Reddit 帖子
- https://www.reddit.com/r/LocalLLaMA/comments/1b9gmvl/meet_einsteinv47b_mistralbased_sft_model_using/
▶️ Youtube 视频
- https://www.youtube.com/watch?v=-3YWgHJIORE&t=18s
- https://www.youtube.com/watch?v=Xo2ySU8gja0
🔧 技术细节
axolotl 配置
查看 axolotl 配置
axolotl 版本:0.4.0
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
load_in_8bit: false
load_in_4bit: false
strict: false
chat_template: chatml
datasets:
- path: data/merged_all.json
ds_type: json
type: alpaca
conversation: chatml
- path: data/capybara_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/synthia-v1.3_sharegpt_12500.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/cot_alpaca_gpt4_extracted_openhermes_2.5_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/slimorca_dedup_filtered_95k_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/airoboros_3.2_without_contextual_slimorca_orca_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
dataset_prepared_path: last_run_prepared
val_set_size: 0.005
output_dir: ./Einstein-v4-model
sequence_len: 8192
sample_packing: true
pad_to_sequence_len: true
eval_sample_packing: false
wandb_project: Einstein
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
hub_model_id: Weyaxi/Einstein-v4-7B
save_safetensors: true
gradient_accumulation_steps: 4
micro_batch_size: 1
num_epochs: 1.5
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.000005
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 10
evals_per_epoch: 2
eval_table_size:
eval_table_max_new_tokens: 128
saves_per_epoch: 4
debug:
deepspeed: zero3_bf16.json
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "<|im_end|>"
unk_token: "<unk>"
tokens:
- "<|im_start|>"
resume_from_checkpoint: Einstein-v4-model/checkpoint-521
训练信息
此模型进行了 1.5 个 epoch 的全量微调,总步数为 1562。
损失图

📄 许可证
文档中提到许可证为 other,但未提供更多详细信息。
🤝 致谢
感谢 sablo.ai 赞助此模型的训练。
感谢数据集部分提到的所有数据集作者。
感谢 axolotl 提供的工具。
感谢所有开源 AI 社区的贡献者。

如果你想支持作者:
☕ 请作者喝杯咖啡