HuggingFace镜像/DCLM-7B
模型介绍文件和版本分析
下载使用量0

DCLM-Baseline-7B 模型卡片

DCLM-Baseline-7B 是一个拥有 70 亿参数的语言模型,它在 DCLM-Baseline 数据集上进行训练。该数据集是作为语言模型数据竞赛(DataComp for Language Models, DCLM)基准的一部分精心构建的。本模型旨在展示系统化数据筛选技术对提升语言模型性能的有效性。

模型详情

规模训练 Token 数层数隐藏层大小注意力头数上下文长度
7B2.5T324096322048

模型说明

  • 开发机构: 语言模型数据竞赛(DataComp for Language Models, DCLM)团队
  • 模型类型: 仅解码器 Transformer 语言模型
  • 支持语言: 英语(主要)
  • 许可证: Apple Sample Code License
  • 联系方式: contact@datacomp.ai
  • 日期: 2024 年 6 月

模型来源

  • 代码库: https://github.com/mlfoundations/dclm
  • 论文: DataComp-LM: In search of the next generation of training sets for language models

使用模型

首先安装 open_lm

pip install git+https://github.com/mlfoundations/open_lm.git

然后:

from open_lm.hf import *
from openmind import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("AI-Research/DCLM-7B")
model = AutoModelForCausalLM.from_pretrained("AI-Research/DCLM-7B",device_map='npu:0')

inputs = tokenizer(["Machine learning is"], return_tensors="pt").to(model.device)
gen_kwargs = {"max_new_tokens": 50, "top_p": 0.8, "temperature": 0.8, "do_sample": True, "repetition_penalty": 1.1}
output = model.generate(inputs['input_ids'], **gen_kwargs)
output = tokenizer.decode(output[0].tolist(), skip_special_tokens=True)
print(output)

训练详情

该模型是基于以下配置进行训练的:

  • 架构:仅解码器的 Transformer
  • 框架:PyTorch 搭配 OpenLM
  • 优化器:AdamW
  • 学习率:2e-3(峰值)
  • 权重衰减:0.05
  • 批处理大小:2048 个序列
  • 序列长度:2048 个 token
  • 总训练 token 量:2.5T
  • 硬件:在 H100 GPU 上训练

评估

以下是 DCLM-Baseline-7B 在各项任务上的评估结果(使用 llm-foundry 评估套件)

任务得分
MMLU(零样本)0.5766
MMLU(少样本)0.6372
HellaSwag(零样本)0.7987
HellaSwag0.8043
Jeopardy0.4745
TriviaQA0.5270
GSM8K(思维链)0.0250
AGI Eval SAT 数学(思维链)0.0136
AQuA(思维链)0.0490
SVAMP(思维链)0.4900
BigBench QA Wikidata0.7120
ARC Easy0.8220
ARC Challenge0.5990
BigBench Misconceptions0.6986
COPA0.8500
SIQA0.8291
CommonsenseQA0.8018
PIQA0.8128
OpenBookQA0.4540
BigBench Novel Concepts0.7188
BigBench Strange Stories0.7586
BigBench Strategy QA0.6173
LAMBADA0.8220
Winograd0.8828
Winogrande0.7269
BigBench Conlang Translation0.0244
BigBench Language Identification0.5219
BigBench Conceptual Combinations0.6990
BigBench Elementary Math QA0.3431
BigBench Dyck Languages0.4930
AGI Eval LSAT AR0.2435
BigBench CS Algorithms0.6121
BigBench Logical Deduction0.3620
BigBench Operators0.4857
BigBench Repeat Copy Logic0.4063
Simple Arithmetic (no spaces)0.2940
Simple Arithmetic (with spaces)0.3110
MathQA0.3098
LogiQA0.4132
PubMedQA0.7060
SQuAD0.5856
AGI Eval LSAT RC0.6716
AGI Eval LSAT LR0.5392
CoQA0.4074
BigBench Understanding Fables0.6825
BoolQ0.8343
AGI Eval SAT EN0.7670
Winogender MC (Female)0.6000
Winogender MC (Male)0.5500
Enterprise PII Classification0.7676
BBQ0.6912
GPQA Main0.2612
GPQA Diamond0.2475

注:所有分数均以 0 到 1 之间的十进制数值呈现,表示各任务中正确答案的比例或模型的性能表现。

对比

以下是本模型与其他7B规模模型的对比。

模型参数规模训练数据量(tokens)是否使用开放数据集?COREMMLUEXTENDED
开放权重,非开放数据集
Llama27B2T❌49.245.834.1
DeepSeek7B2T❌50.748.535.3
Mistral-0.37B?❌57.062.745.1
QWEN-27B?❌57.571.950.5
Llama38B15T❌57.666.246.3
Gemma8B6T❌57.864.344.6
Phi-37B?❌61.069.957.9
开放权重,开放数据集
Falcon7B1T✅44.127.425.1
OLMo-1.77B2.1T✅47.054.034.2
MAP-Neo7B4.5T✅50.257.140.4
DCLM-7B7B2.5T✅56.163.743.6

局限性与偏差

尽管DCLM-Baseline-7B在一系列任务中表现出较强的性能,但需要注意以下几点:

  1. 该模型可能会展现出其训练数据中存在的偏差,其训练数据来源于网络爬取数据。
  2. 它尚未经过特定的对齐或安全微调,因此使用其输出时应谨慎。
  3. 在评估套件未包含的任务上,其性能可能会有所不同。
  4. 模型的知识局限于其训练数据的截止日期。

伦理考量

用户应注意,此模型与所有大型语言模型一样,有可能生成有害或带有偏见的内容。在没有适当的保障措施和人工监督的情况下,不应将其用于对个人做出决策或应用于敏感场景。

引用说明

如果您在研究中使用了本模型,请引用:

@article{Li2024DataCompLM,
  title={DataComp-LM: In search of the next generation of training sets for language models},
  author={Jeffrey Li and Alex Fang and Georgios Smyrnis and Maor Ivgi and Matt Jordan and Samir Gadre and Hritik Bansal and Etash Guha and Sedrick Keh and Kushal Arora and [... full author list]},
  journal={arXiv preprint arXiv:2406.11794},
  year={2024}
}