apple/DCLM-7B

Model

Model Card for DCLM-Baseline-7B

834

20 commits

3 linked in READMEs

updated Jul 26, 2024

See the code

README

DCLM Logo

Model Card for DCLM-Baseline-7B

DCLM-Baseline-7B is a 7 billion parameter language model trained on the DCLM-Baseline dataset, which was curated as part of the DataComp for Language Models (DCLM) benchmark. This model is designed to showcase the effectiveness of systematic data curation techniques for improving language model performance.

Model Details

SizeTraining TokensLayersHidden SizeAttention HeadsContext Length
7B2.5T324096322048

Model Description

  • Developed by: DataComp for Language Models (DCLM) Team
  • Model type: Decoder-only Transformer language model
  • Language(s): English (primarily)
  • License: Apple Sample Code License
  • Contact: contact@datacomp.ai
  • Date: June 2024

Model Sources

Using Model

First install open_lm

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

Then:

from open_lm.hf import *
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("apple/DCLM-Baseline-7B")
model = AutoModelForCausalLM.from_pretrained("apple/DCLM-Baseline-7B")

inputs = tokenizer(["Machine learning is"], return_tensors="pt")
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)

Training Details

The model was trained using the following setup:

  • Architecture: Decoder-only Transformer
  • Framework: PyTorch with OpenLM
  • Optimizer: AdamW
  • Learning Rate: 2e-3 (peak)
  • Weight Decay: 0.05
  • Batch Size: 2048 sequences
  • Sequence Length: 2048 tokens
  • Total Training Tokens: 2.5T
  • Hardware: Trained on H100 GPUs

For more detailed training information, please refer to Section 3.4 and Appendix F of the DCLM paper. To ensure our trained model is broadly useful, including for math and coding tasks, we combine our 3.8T DCLM-BASELINE with the StarCoder and ProofPile2 data to arrive at a 4.1T token dataset.

Evaluation

Here are the evaluation results for DCLM-Baseline-7B on various tasks (using llm-foundry eval suite)

TaskScore
MMLU (zero-shot)0.5766
MMLU (few-shot)0.6372
HellaSwag (zero-shot)0.7987
HellaSwag0.8043
Jeopardy0.4745
TriviaQA0.5270
GSM8K (CoT)0.0250
AGI Eval SAT Math (CoT)0.0136
AQuA (CoT)0.0490
SVAMP (CoT)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

Note: All scores are presented as decimal values between 0 and 1, representing the proportion of correct answers or the model's performance on each task.

Comparison

Below are comparisions of this model with other models in the 7B regime.

ModelParamsTokensOpen dataset?COREMMLUEXTENDED
Open weights, closed datasets
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
Open weights, open datasets
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

Limitations and Biases

While DCLM-Baseline-7B demonstrates strong performance across a range of tasks, it's important to note:

  1. The model may exhibit biases present in its training data, which is derived from web crawl data.
  2. It has not undergone specific alignment or safety fine-tuning, so outputs should be used with caution.
  3. Performance on tasks not included in the evaluation suite may vary.
  4. The model's knowledge is limited to its training data cutoff date.

Ethical Considerations

Users should be aware that this model, like all large language models, can potentially generate harmful or biased content. It should not be used for making decisions about individuals or in sensitive applications without appropriate safeguards and human oversight.

Citation

If you use this model in your research, please cite:

@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}
}
endpoints_compatible
openlm
safetensors
transformers

Contributors

vaishaal

19 commits

Chan-Y

1 commits

apple/DCLM-7B

Model

Model Card for DCLM-Baseline-7B

834

20 commits

3 linked in READMEs

updated Jul 26, 2024

See the code

README

DCLM Logo

Model Card for DCLM-Baseline-7B

DCLM-Baseline-7B is a 7 billion parameter language model trained on the DCLM-Baseline dataset, which was curated as part of the DataComp for Language Models (DCLM) benchmark. This model is designed to showcase the effectiveness of systematic data curation techniques for improving language model performance.

Model Details

SizeTraining TokensLayersHidden SizeAttention HeadsContext Length
7B2.5T324096322048

Model Description

  • Developed by: DataComp for Language Models (DCLM) Team
  • Model type: Decoder-only Transformer language model
  • Language(s): English (primarily)
  • License: Apple Sample Code License
  • Contact: contact@datacomp.ai
  • Date: June 2024

Model Sources

Using Model

First install open_lm

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

Then:

from open_lm.hf import *
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("apple/DCLM-Baseline-7B")
model = AutoModelForCausalLM.from_pretrained("apple/DCLM-Baseline-7B")

inputs = tokenizer(["Machine learning is"], return_tensors="pt")
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)

Training Details

The model was trained using the following setup:

  • Architecture: Decoder-only Transformer
  • Framework: PyTorch with OpenLM
  • Optimizer: AdamW
  • Learning Rate: 2e-3 (peak)
  • Weight Decay: 0.05
  • Batch Size: 2048 sequences
  • Sequence Length: 2048 tokens
  • Total Training Tokens: 2.5T
  • Hardware: Trained on H100 GPUs

For more detailed training information, please refer to Section 3.4 and Appendix F of the DCLM paper. To ensure our trained model is broadly useful, including for math and coding tasks, we combine our 3.8T DCLM-BASELINE with the StarCoder and ProofPile2 data to arrive at a 4.1T token dataset.

Evaluation

Here are the evaluation results for DCLM-Baseline-7B on various tasks (using llm-foundry eval suite)

TaskScore
MMLU (zero-shot)0.5766
MMLU (few-shot)0.6372
HellaSwag (zero-shot)0.7987
HellaSwag0.8043
Jeopardy0.4745
TriviaQA0.5270
GSM8K (CoT)0.0250
AGI Eval SAT Math (CoT)0.0136
AQuA (CoT)0.0490
SVAMP (CoT)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

Note: All scores are presented as decimal values between 0 and 1, representing the proportion of correct answers or the model's performance on each task.

Comparison

Below are comparisions of this model with other models in the 7B regime.

ModelParamsTokensOpen dataset?COREMMLUEXTENDED
Open weights, closed datasets
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
Open weights, open datasets
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

Limitations and Biases

While DCLM-Baseline-7B demonstrates strong performance across a range of tasks, it's important to note:

  1. The model may exhibit biases present in its training data, which is derived from web crawl data.
  2. It has not undergone specific alignment or safety fine-tuning, so outputs should be used with caution.
  3. Performance on tasks not included in the evaluation suite may vary.
  4. The model's knowledge is limited to its training data cutoff date.

Ethical Considerations

Users should be aware that this model, like all large language models, can potentially generate harmful or biased content. It should not be used for making decisions about individuals or in sensitive applications without appropriate safeguards and human oversight.

Citation

If you use this model in your research, please cite:

@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}
}
endpoints_compatible
openlm
safetensors
transformers

Contributors

vaishaal

19 commits

Chan-Y

1 commits