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