Hyperion 3.0 Mistral 7B DPO
基於Mistral-7B的DPO優化模型,擅長問答、代碼生成及多領域推理任務
下載量 15
發布時間 : 3/24/2024
模型概述
通過直接偏好優化(DPO)技術微調的高性能語言模型,專注於複雜推理、編程輔助和專業領域問題求解
模型特點
DPO優化
使用GPT-4生成的20,000組高質量偏好對數據進行直接偏好優化
多領域能力
在STEM、社會科學及人文學科領域均展現出色表現
專業推理
特別強化數學推導和邏輯推理能力,可處理複雜科學問題
模型能力
文本生成
技術問答
代碼生成
醫學文本分析
數學問題求解
邏輯推理
多輪對話
使用案例
教育
物理教學輔助
解析力學問題並建立微分方程
如示例所示可完整推導拋體運動方程
軟件開發
代碼生成
根據自然語言描述生成可執行代碼
醫療
醫學文本分析
解析專業醫學文獻並提取關鍵信息
🚀 Hyperion-3.0-Mistral-7B-DPO
Hyperion-3.0-Mistral-7B-DPO 是一個經過精細微調的語言模型,它在多種複雜任務中表現出色,如問答、對話、代碼生成等。通過使用精心挑選的訓練數據和優化技術,該模型能夠提供高質量的輸出,滿足不同領域的需求。
🚀 快速開始
以下是使用 Hyperion-3.0-Mistral-7B-DPO 進行文本生成的基本代碼示例:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Locutusque/Hyperion-3.0-Mistral-7B-DPO"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# For a text generation task
input_text = "<|im_start|>user\nExplain the implications of quantum entanglement in layman's terms.<|im_end|>\n<|im_start|>assistant\n"
input_ids = tokenizer.encode(input_text, return_tensors="pt")
# Generate a response
outputs = model.generate(input_ids, max_length=200, do_sample=True, top_p=0.7, top_k=6) # These are the recommended sample settings.
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
✨ 主要特性
- 多領域應用:支持問答、對話式 AI、代碼生成、醫學文本理解、數學推理和邏輯推理等多種複雜任務。
- 高質量數據訓練:使用由 GPT - 4 生成的 20,000 個精心挑選的偏好對數據集進行微調,確保模型輸出的質量和相關性。
- 符合人類偏好:通過直接偏好優化(DPO)進一步優化訓練數據,使模型輸出更符合人類偏好。
📦 安裝指南
文檔中未提及具體安裝步驟,若需使用該模型,可參考上述快速開始部分的代碼示例,確保已安裝 transformers
庫。
💻 使用示例
基礎用法
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Locutusque/Hyperion-3.0-Mistral-7B-DPO"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# For a text generation task
input_text = "<|im_start|>user\nExplain the implications of quantum entanglement in layman's terms.<|im_end|>\n<|im_start|>assistant\n"
input_ids = tokenizer.encode(input_text, return_tensors="pt")
# Generate a response
outputs = model.generate(input_ids, max_length=200, do_sample=True, top_p=0.7, top_k=6) # These are the recommended sample settings.
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
高級用法
文檔中未提及高級用法相關代碼示例。
📚 詳細文檔
模型詳情
屬性 | 詳情 |
---|---|
模型名稱 | Locutusque/Hyperion-3.0-Mistral-7B-DPO |
基礎模型 | mistralai/Mistral-7B-v0.1 |
發佈者 | Locutusque |
模型類型 | 問答、對話式 AI、代碼生成、醫學文本理解、數學推理、邏輯推理 |
語言 | 多領域、英語 |
許可證 | Apache - 2.0 |
預期用途
該模型適用於研究人員、開發者和組織,可用於解決各領域的挑戰性問題。潛在用例包括:
- 科學、醫學、數學和計算機科學領域的智能輔導系統和教育應用。
- 技術支持、客戶服務和特定領域聊天機器人的高級對話式 AI。
- 軟件開發和編程輔助的代碼生成與分析工具。
- 醫療專業人員和研究人員的醫學文本分析與信息檢索。
- 學術界和工業界的數學問題解決和邏輯推理應用。
訓練數據
Locutusque/Hyperion-3.0-Mistral-7B-DPO
模型在精心挑選的 20,000 個偏好對數據集上進行微調,其中 4,000 個示例用於微調。這些示例由 GPT - 4 生成,涵蓋編程、醫學文本、數學問題和推理任務等多個領域。訓練數據通過直接偏好優化(DPO)進一步優化,使模型輸出更符合人類偏好,提高整體性能。
量化版本
- ExLlamaV2: https://huggingface.co/bartowski/Hyperion-3.0-Mistral-7B-DPO-exl2
- GGUF: https://huggingface.co/bartowski/Hyperion-3.0-Mistral-7B-DPO-GGUF
評估結果
任務評估
任務 | 版本 | 過濾器 | n - shot | 指標 | 值 | 標準誤差 | |
---|---|---|---|---|---|---|---|
mmlu_flan_cot_fewshot | N/A | get - answer | 0 | exact_match | 0.5833 | ± | 0.0118 |
- mmlu_flan_cot_fewshot_humanities | N/A | get - answer | 0 | exact_match | 0.5039 | ± | 0.0205 |
- mmlu_flan_cot_fewshot_formal_logic | 0 | get - answer | 0 | exact_match | 0.2143 | ± | 0.1138 |
- mmlu_flan_cot_fewshot_high_school_european_history | 0 | get - answer | 0 | exact_match | 0.6667 | ± | 0.1143 |
- mmlu_flan_cot_fewshot_high_school_us_history | 0 | get - answer | 0 | exact_match | 0.7727 | ± | 0.0914 |
- mmlu_flan_cot_fewshot_high_school_world_history | 0 | get - answer | 0 | exact_match | 0.5385 | ± | 0.0997 |
- mmlu_flan_cot_fewshot_international_law | 0 | get - answer | 0 | exact_match | 0.9231 | ± | 0.0769 |
- mmlu_flan_cot_fewshot_jurisprudence | 0 | get - answer | 0 | exact_match | 0.5455 | ± | 0.1575 |
- mmlu_flan_cot_fewshot_logical_fallacies | 0 | get - answer | 0 | exact_match | 0.7778 | ± | 0.1008 |
- mmlu_flan_cot_fewshot_moral_disputes | 0 | get - answer | 0 | exact_match | 0.5526 | ± | 0.0817 |
- mmlu_flan_cot_fewshot_moral_scenarios | 0 | get - answer | 0 | exact_match | 0.4000 | ± | 0.0492 |
- mmlu_flan_cot_fewshot_philosophy | 0 | get - answer | 0 | exact_match | 0.7647 | ± | 0.0738 |
- mmlu_flan_cot_fewshot_prehistory | 0 | get - answer | 0 | exact_match | 0.6571 | ± | 0.0814 |
- mmlu_flan_cot_fewshot_professional_law | 0 | get - answer | 0 | exact_match | 0.3294 | ± | 0.0362 |
- mmlu_flan_cot_fewshot_world_religions | 0 | get - answer | 0 | exact_match | 0.8947 | ± | 0.0723 |
- mmlu_flan_cot_fewshot_other | N/A | get - answer | 0 | exact_match | 0.6833 | ± | 0.0244 |
- mmlu_flan_cot_fewshot_business_ethics | 0 | get - answer | 0 | exact_match | 0.9091 | ± | 0.0909 |
- mmlu_flan_cot_fewshot_clinical_knowledge | 0 | get - answer | 0 | exact_match | 0.5862 | ± | 0.0931 |
- mmlu_flan_cot_fewshot_college_medicine | 0 | get - answer | 0 | exact_match | 0.6364 | ± | 0.1050 |
- mmlu_flan_cot_fewshot_global_facts | 0 | get - answer | 0 | exact_match | 0.6000 | ± | 0.1633 |
- mmlu_flan_cot_fewshot_human_aging | 0 | get - answer | 0 | exact_match | 0.6087 | ± | 0.1041 |
- mmlu_flan_cot_fewshot_management | 0 | get - answer | 0 | exact_match | 0.9091 | ± | 0.0909 |
- mmlu_flan_cot_fewshot_marketing | 0 | get - answer | 0 | exact_match | 0.8000 | ± | 0.0816 |
- mmlu_flan_cot_fewshot_medical_genetics | 0 | get - answer | 0 | exact_match | 1.0000 | ± | 0.0000 |
- mmlu_flan_cot_fewshot_miscellaneous | 0 | get - answer | 0 | exact_match | 0.8023 | ± | 0.0432 |
- mmlu_flan_cot_fewshot_nutrition | 0 | get - answer | 0 | exact_match | 0.6667 | ± | 0.0833 |
- mmlu_flan_cot_fewshot_professional_accounting | 0 | get - answer | 0 | exact_match | 0.4839 | ± | 0.0912 |
- mmlu_flan_cot_fewshot_professional_medicine | 0 | get - answer | 0 | exact_match | 0.5806 | ± | 0.0901 |
- mmlu_flan_cot_fewshot_virology | 0 | get - answer | 0 | exact_match | 0.3889 | ± | 0.1182 |
- mmlu_flan_cot_fewshot_social_sciences | N/A | get - answer | 0 | exact_match | 0.7003 | ± | 0.0239 |
- mmlu_flan_cot_fewshot_econometrics | 0 | get - answer | 0 | exact_match | 0.4167 | ± | 0.1486 |
- mmlu_flan_cot_fewshot_high_school_geography | 0 | get - answer | 0 | exact_match | 0.9091 | ± | 0.0627 |
- mmlu_flan_cot_fewshot_high_school_government_and_politics | 0 | get - answer | 0 | exact_match | 0.8095 | ± | 0.0878 |
- mmlu_flan_cot_fewshot_high_school_macroeconomics | 0 | get - answer | 0 | exact_match | 0.6512 | ± | 0.0735 |
- mmlu_flan_cot_fewshot_high_school_microeconomics | 0 | get - answer | 0 | exact_match | 0.5769 | ± | 0.0988 |
- mmlu_flan_cot_fewshot_high_school_psychology | 0 | get - answer | 0 | exact_match | 0.9000 | ± | 0.0391 |
- mmlu_flan_cot_fewshot_human_sexuality | 0 | get - answer | 0 | exact_match | 0.6667 | ± | 0.1421 |
- mmlu_flan_cot_fewshot_professional_psychology | 0 | get - answer | 0 | exact_match | 0.6522 | ± | 0.0578 |
- mmlu_flan_cot_fewshot_public_relations | 0 | get - answer | 0 | exact_match | 0.5833 | ± | 0.1486 |
- mmlu_flan_cot_fewshot_security_studies | 0 | get - answer | 0 | exact_match | 0.4074 | ± | 0.0964 |
- mmlu_flan_cot_fewshot_sociology | 0 | get - answer | 0 | exact_match | 0.8182 | ± | 0.0842 |
- mmlu_flan_cot_fewshot_us_foreign_policy | 0 | get - answer | 0 | exact_match | 0.7273 | ± | 0.1408 |
- mmlu_flan_cot_fewshot_stem | N/A | get - answer | 0 | exact_match | 0.4866 | ± | 0.0262 |
- mmlu_flan_cot_fewshot_abstract_algebra | 0 | get - answer | 0 | exact_match | 0.0909 | ± | 0.0909 |
- mmlu_flan_cot_fewshot_anatomy | 0 | get - answer | 0 | exact_match | 0.4286 | ± | 0.1373 |
- mmlu_flan_cot_fewshot_astronomy | 0 | get - answer | 0 | exact_match | 0.5625 | ± | 0.1281 |
- mmlu_flan_cot_fewshot_college_biology | 0 | get - answer | 0 | exact_match | 0.5000 | ± | 0.1291 |
- mmlu_flan_cot_fewshot_college_chemistry | 0 | get - answer | 0 | exact_match | 0.5000 | ± | 0.1890 |
- mmlu_flan_cot_fewshot_college_computer_science | 0 | get - answer | 0 | exact_match | 0.2727 | ± | 0.1408 |
- mmlu_flan_cot_fewshot_college_mathematics | 0 | get - answer | 0 | exact_match | 0.3636 | ± | 0.1521 |
- mmlu_flan_cot_fewshot_college_physics | 0 | get - answer | 0 | exact_match | 0.3636 | ± | 0.1521 |
- mmlu_flan_cot_fewshot_computer_security | 0 | get - answer | 0 | exact_match | 0.7273 | ± | 0.1408 |
- mmlu_flan_cot_fewshot_conceptual_physics | 0 | get - answer | 0 | exact_match | 0.6538 | ± | 0.0951 |
- mmlu_flan_cot_fewshot_electrical_engineering | 0 | get - answer | 0 | exact_match | 0.7500 | ± | 0.1118 |
- mmlu_flan_cot_fewshot_elementary_mathematics | 0 | get - answer | 0 | exact_match | 0.7317 | ± | 0.0701 |
- mmlu_flan_cot_fewshot_high_school_biology | 0 | get - answer | 0 | exact_match | 0.5938 | ± | 0.0882 |
- mmlu_flan_cot_fewshot_high_school_chemistry | 0 | get - answer | 0 | exact_match | 0.3636 | ± | 0.1050 |
- mmlu_flan_cot_fewshot_high_school_computer_science | 0 | get - answer | 0 | exact_match | 0.5556 | ± | 0.1757 |
- mmlu_flan_cot_fewshot_high_school_mathematics | 0 | get - answer | 0 | exact_match | 0.3103 | ± | 0.0874 |
- mmlu_flan_cot_fewshot_high_school_physics | 0 | get - answer | 0 | exact_match | 0.2353 | ± | 0.1060 |
- mmlu_flan_cot_fewshot_high_school_statistics | 0 | get - answer | 0 | exact_match | 0.3043 | ± | 0.0981 |
- mmlu_flan_cot_fewshot_machine_learning | 0 | get - answer | 0 | exact_match | 0.4545 | ± | 0.1575 |
分組評估
分組 | 版本 | 過濾器 | n - shot | 指標 | 值 | 標準誤差 | |
---|---|---|---|---|---|---|---|
mmlu_flan_cot_fewshot | N/A | get - answer | 0 | exact_match | 0.5833 | ± | 0.0118 |
- mmlu_flan_cot_fewshot_humanities | N/A | get - answer | 0 | exact_match | 0.5039 | ± | 0.0205 |
- mmlu_flan_cot_fewshot_other | N/A | get - answer | 0 | exact_match | 0.6833 | ± | 0.0244 |
- mmlu_flan_cot_fewshot_social_sciences | N/A | get - answer | 0 | exact_match | 0.7003 | ± | 0.0239 |
- mmlu_flan_cot_fewshot_stem | N/A | get - answer | 0 | exact_match | 0.4866 | ± | 0.0262 |
🔧 技術細節
文檔中未提及具體技術實現細節。
📄 許可證
該模型採用 Apache - 2.0 許可證發佈。
⚠️ 重要提示
- 儘管訓練數據經過精心挑選和優化,但由於源數據集的複雜性和多樣性,模型輸出可能仍存在一些不一致或偏差。用戶應注意潛在的侷限性,並針對特定用例仔細評估模型的輸出。
- 此模型具有高度的合規性,會嘗試響應大多數請求。對於企業級部署,強烈建議使用 DPO 進一步微調模型,使其行為符合特定要求和約束。
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