Einstein V7 Qwen2 7B
Einstein-v7-Qwen2-7B是基于Qwen/Qwen2-7B在多种科学领域数据集上进行全量微调得到的文本生成模型,在科学、物理、化学、生物、数学等多个领域表现出色。
下载量 1,927
发布时间 : 6/24/2024
模型简介
该模型是基于Qwen2-7B架构的全量微调版本,专注于科学领域的文本生成任务,支持多领域知识问答和内容生成。
模型特点
多领域科学知识
在科学、物理、化学、生物、数学等多个领域进行专门训练,具备专业领域的文本生成能力
高性能硬件优化
使用8xMI300X硬件进行微调,充分发挥硬件性能
ChatML模板支持
支持ChatML对话模板,便于对话式文本生成
长上下文处理
支持8192的序列长度,能够处理长文本内容
模型能力
科学领域文本生成
多领域知识问答
专业内容创作
教育辅助
研究支持
使用案例
教育
科学知识讲解
为学生解释复杂的科学概念和原理
提供准确、易懂的科学知识解释
作业辅导
帮助学生解决科学、数学等学科的作业问题
提供分步解答和详细解释
研究
文献摘要
为科研人员生成科学文献的摘要和关键点
快速理解文献核心内容
研究思路生成
帮助研究人员生成新的研究思路和实验设计
提供创新的研究方向建议
🚀 🔬 Einstein-v7-Qwen2-7B
Einstein-v7-Qwen2-7B 是基于 Qwen/Qwen2-7B 在多种数据集上进行全量微调得到的模型。它在科学、物理、化学、生物、数学等多个领域表现出色,为文本生成任务提供了强大的支持。
🚀 快速开始
模型基础信息
属性 | 详情 |
---|---|
基础模型 | Qwen/Qwen2-7B |
模型类型 | 基于 Qwen2-7B 全量微调的文本生成模型 |
训练数据集 | allenai/ai2_arc、camel-ai/physics、camel-ai/chemistry 等众多数据集 |
提示模板
在使用该模型时,可以使用 ChatML 提示模板:
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)
✨ 主要特性
- 多领域数据集训练:使用了涵盖科学、物理、化学、生物、数学等多个领域的数据集进行训练,使模型在这些领域的文本生成任务中表现出色。
- 特定硬件微调:使用
8xMI300X
硬件进行微调,充分发挥硬件性能。 - 支持 ChatML 模板:方便用户进行对话式文本生成。
📦 安装指南
文档未提供具体安装步骤,故跳过该章节。
💻 使用示例
基础用法
使用 ChatML 模板进行文本生成:
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)
📚 详细文档
数据集使用情况
本模型训练所使用的数据集在模型卡片的元数据部分列出。需要注意的是,元数据中提到的某些数据集可能根据各种标准进行了过滤。过滤过程的结果和相关信息在另一个仓库中:Weyaxi/sci-datasets/main
量化版本
GGUF @bartowski
- https://huggingface.co/bartowski/Einstein-v7-Qwen2-7B-GGUF
ExLlamaV2 @bartowski
- https://huggingface.co/bartowski/Einstein-v7-Qwen2-7B-exl2
评估结果
Open LLM Leaderboard v2 评估结果 详细结果可查看 这里
指标 | 值 |
---|---|
平均值 | 24.01 |
IFEval (0-Shot) | 41.00 |
BBH (3-Shot) | 32.84 |
MATH Lvl 5 (4-Shot) | 15.18 |
GPQA (0-shot) | 6.60 |
MuSR (0-shot) | 14.06 |
MMLU-PRO (5-shot) | 34.40 |
相关资源、讨论和评测
🐦 公告推文
- https://twitter.com/Weyaxi/status/1809644014515154961
🔍 Reddit 帖子
- https://www.reddit.com/r/LocalLLaMA/comments/1dy6o4l/introducing_einstein_v7_based_on_the_qwen2_7b/
训练相关信息
本模型进行了 2 个 epoch 的全量微调,总步数为 500。
损失图
🔧 技术细节
axolotl 配置
查看 axolotl 配置
axolotl 版本:0.4.0
base_model: Qwen/Qwen2-7B
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: false
strict: false
chat_template: chatml
datasets:
- path: data/airoboros_3.2_without_contextual_slimorca_orca_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/allenai_wild_chat_gpt4_english_toxic_random_half_4k_sharegpt.json
ds_type: json
type: sharegpt
strict: false
conversation: chatml
- path: data/buzz_unstacked_chosen_math_removed_filtered.json
ds_type: json
type: alpaca
conversation: chatml
- path: data/capybara_sharegpt.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/everythinglm-data-v3_sharegpt.json
ds_type: json
type: sharegpt
strict: false
conversation: chatml
- path: data/gpt4_data_lmys_1m_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/gpteacher-instruct-special-alpaca.json
ds_type: json
type: gpteacher
conversation: chatml
- path: data/merged_all.json
ds_type: json
type: alpaca
conversation: chatml
- path: data/no_robots_sharegpt.json
ds_type: json
type: sharegpt
strict: false
conversation: chatml
- path: data/oasst_top1_from_fusechatmixture_sharegpt.json
ds_type: json
type: sharegpt
strict: false
conversation: chatml
- path: data/pippa_bagel_repo_3k_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/rpguild_quarter_alignment_lab_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
- path: data/sharegpt_gpt4_english.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/soda_diaolog_longest_tenth_buzz_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/system_conversations_dolphin_sharegpt.json
ds_type: json
type: sharegpt
conversation: chatml
dataset_prepared_path: last_run_prepared
val_set_size: 0.002
output_dir: ./Einstein-v7-Qwen2-7B-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-v7-Qwen2-7B
gradient_accumulation_steps: 4
micro_batch_size: 6
num_epochs: 2
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 0.00001 # look
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: unsloth
gradient_checkpointing_kwargs:
use_reentrant: true # look
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_max_new_tokens: 128
saves_per_epoch: 1
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|>"
📄 许可证
本模型使用其他许可证。
🤝 致谢
感谢模型训练所使用的所有数据集的作者。感谢 axolotl 提供的仓库,让我能够制作这个模型。感谢所有开源 AI 社区的贡献者。
如果你想支持我:
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