🚀 DeciLM-7B
DeciLM-7B是一個擁有70.4億參數的僅解碼器文本生成模型,以Apache 2.0許可證發佈。發佈時,DeciLM-7B是Open LLM排行榜上性能最優的70億參數基礎語言模型。該模型支持8K的標記序列長度,採用可變分組查詢注意力機制(GQA),在準確性和計算效率之間實現了出色的平衡。其模型架構由Deci專有的神經架構搜索技術AutoNAC生成。
🚀 快速開始
使用以下代碼開始使用該模型:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Deci/DeciLM-7B"
device = "cuda"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", trust_remote_code=True).to(device)
inputs = tokenizer.encode("In a shocking finding, scientists discovered a herd of unicorns living in", return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=100, do_sample=True, top_p=0.95)
print(tokenizer.decode(outputs[0]))
from transformers import pipeline
generator = pipeline("text-generation", "Deci/DeciLM-7B", torch_dtype="auto", trust_remote_code=True, device=device)
outputs = generator("In a shocking finding, scientists discovered a herd of unicorns living in", max_new_tokens=100, do_sample=True, top_p=0.95)
print(outputs[0]["generated_text"])
✨ 主要特性
- 高性能:在Open LLM排行榜上,是當時表現最優的70億參數基礎語言模型。
- 長序列支持:支持8K標記的序列長度。
- 高效架構:採用可變分組查詢注意力機制(GQA),平衡了準確性和計算效率。
- 高吞吐量:吞吐量最高可達Mistral - 7B的4.4倍。
📚 詳細文檔
模型詳情
模型描述
Deci開發併發布了DeciLM - 7B語言模型,這是一個預訓練的、高效的文本生成模型,擁有70億參數。DeciLM - 7B不僅是最準確的70億參數基礎模型,而且在同類模型中吞吐量領先,最高可達Mistral - 7B的4.4倍。此外,還發布了指令微調版本DeciLM - 7B - instruct。
- 開發者:Deci
- 模型類型:DeciLM是一個自迴歸語言模型,採用了優化的Transformer解碼器架構,包含可變分組查詢注意力機制。
- 語言:英語
- 許可證:Apache 2.0
模型架構
參數 |
詳情 |
模型類型 |
自迴歸語言模型,採用優化的Transformer解碼器架構,包含可變分組查詢注意力機制 |
訓練數據 |
未提及 |
層數 |
32 |
頭數 |
32 |
序列長度 |
8192 |
GQA鍵值頭數量 |
可變 |
注:AutoNAC用於優化每層GQA鍵值頭數量的選擇。
模型資源
評估
以下是DeciLM - 7B和DeciLM - 7B - instruct在Open LLM排行榜上的結果:
模型 |
平均分 |
ARC |
HellaSwag |
MMLU |
TruthfulQA |
Winogrande |
GSM8K |
DecilLM - 7B |
61.55 |
59.39 |
82.51 |
59.76 |
40.33 |
79.95 |
47.38 |
DecilLM - 7B - instruct |
63.19 |
61.01 |
82.37 |
60.24 |
49.75 |
79.72 |
46.02 |
運行時基準測試
推理工具 |
硬件 |
提示長度 |
生成長度 |
每秒生成標記數 |
批次大小 |
提示數量 |
HuggingFace (PyTorch) |
A100 (SXM4 - 80GB - 400W) |
512 |
512 |
1174 |
352 |
352 |
HuggingFace (PyTorch) |
A100 (SXM4 - 80GB - 400W) |
2048 |
2048 |
328 |
72 |
72 |
Infery - LLM |
A100 (SXM4 - 80GB - 400W) |
512 |
512 |
4559 |
1024 |
4096 |
Infery - LLM |
A100 (SXM4 - 80GB - 400W) |
2048 |
2048 |
3997 |
512 |
2048 |
Infery - LLM |
A10 |
512 |
512 |
1345 |
128 |
512 |
Infery - LLM |
A10 |
2048 |
2048 |
599 |
32 |
128 |
- 若要復現Hugging Face基準測試結果,可使用此代碼示例。
- Infery - LLM是Deci的推理引擎,具備一系列優化算法,包括選擇性量化、優化的束搜索、連續批處理和自定義CUDA內核。若要探索Infery - LLM的功能,預約即時演示。
倫理考量與侷限性
DeciLM - 7B是一項新技術,其使用存在固有風險。目前的測試主要在英語環境下進行,未涵蓋所有可能的場景。與所有大語言模型一樣,DeciLM - 7B的輸出不可預測,可能會生成不準確、有偏見或其他令人反感的響應。因此,計劃使用DeciLM - 7B的開發者在部署前應針對其預期應用對模型進行全面的安全測試和調優。
引用方式
請使用以下格式引用此模型:
@misc{DeciFoundationModels,
title = {DeciLM-7B},
author = {DeciAI Research Team},
year = {2023}
url={https://huggingface.co/Deci/DeciLM-7B},
}
📄 許可證
本模型以Apache 2.0許可證發佈。