🚀 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许可证发布。