DCLM-IT-7B is a 7 billion parameter language model trained on the DCLM-Baseline dataset and then further finetuned on our DCLM-IT finetuning mixture. This model is designed to showcase the effectiveness of systematic data curation techniques for improving language model performance.
| Size | Training Tokens | Layers | Hidden Size | Attention Heads | Context Length |
|---|---|---|---|---|---|
| 7B | 2.508T | 32 | 4096 | 32 | 2048 |
The model was trained using the following setup:
For more detailed training information, please refer to Section 3.4 and Appendix F of the DCLM paper.
Here are the evaluation results for DCLM-Baseline-7B on various tasks (using llm-foundry eval suite)
| Model | Params | Tokens | CORE | EXTENDED | MMLU | GSM8K |
|---|---|---|---|---|---|---|
| DCLM-Baseline-7B | 7B | 2.5T | 56.0 | 43.7 | 63.9 | 2.1 |
| DCLM-IT-7B | 7B | 2.508T | 55.0 | 46.5 | 62.9 | 52.5 |
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.
Moreover, we present our evaluation results on Length-Controlled Alpaca-Eval 2.0 to measure our instruction-following capabilities.
| Model | AlpacaEval2.0 LC Win-rate (%) |
|---|---|
| Our runs | |
| DCLM-IT-7B | 16.6 |
| Mistral-7B w/ OpenHermes 2.5 | 15.4 |
| DCLM-Baseline-7B w/ OpenHermes 2.5 | 13.8 |
| Reported from the leaderboard | |
| LLaMA-3-Instruct-8B | 22.9 |
| Mistral-v0.2-7B | 17.1 |
| Mistral-7B w/ OpenHermes 2.5 | 16.2 |
| Zephyr-Beta-7B | 13.2 |
| Vicuna-v1.3-13B | 10.8 |
| Gemma-Instruct-7B | 10.4 |
| Nous-Hermes-13B | 9.7 |
| DaVinci001 | 9.0 |
| LLaMA-2-Chat-13B | 8.4 |
| Alpaca-7B | 5.9 |
This is example code on how to run the chat model.
from transformers import AutoTokenizer
from open_lm.utils.transformers.hf_config import OpenLMConfig
import torch
from open_lm.utils.transformers.hf_model import OpenLMConfig, OpenLMforCausalLM
# Load the model and tokenizer
model_name = "mlfoundations/dclm-it"
# Load the configuration, tokenizer, and model separately
config = OpenLMConfig.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = OpenLMforCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="cuda", config=config)
# Define the prompt format
def create_prompt(instruction):
PROMPT = '''Below is an instruction that describes a task.\n\nWrite a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:'''
return PROMPT.format(instruction=instruction)
# Example instruction
instruction = "Give me a poem about Sachin Tendulkar."
# Create the prompt
prompt = create_prompt(instruction)
# Tokenize the input
input_ids = tokenizer.encode(prompt, return_tensors="pt").to(torch.device('cuda'))
# Generate the response
output = model.generate(input_ids, max_length=500, top_p=.95, do_sample=True, temperature=0.3)
# Decode the response
response = tokenizer.decode(output[0][len(input_ids[0]):])
response = response.split("<|endoftext|>")[0]
# Print the response
print(response)
While DCLM-Baseline-7B demonstrates strong performance across a range of tasks, it's important to note:
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.
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}
}
DCLM-IT-7B is a 7 billion parameter language model trained on the DCLM-Baseline dataset and then further finetuned on our DCLM-IT finetuning mixture. This model is designed to showcase the effectiveness of systematic data curation techniques for improving language model performance.
| Size | Training Tokens | Layers | Hidden Size | Attention Heads | Context Length |
|---|---|---|---|---|---|
| 7B | 2.508T | 32 | 4096 | 32 | 2048 |
The model was trained using the following setup:
For more detailed training information, please refer to Section 3.4 and Appendix F of the DCLM paper.
Here are the evaluation results for DCLM-Baseline-7B on various tasks (using llm-foundry eval suite)
| Model | Params | Tokens | CORE | EXTENDED | MMLU | GSM8K |
|---|---|---|---|---|---|---|
| DCLM-Baseline-7B | 7B | 2.5T | 56.0 | 43.7 | 63.9 | 2.1 |
| DCLM-IT-7B | 7B | 2.508T | 55.0 | 46.5 | 62.9 | 52.5 |
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.
Moreover, we present our evaluation results on Length-Controlled Alpaca-Eval 2.0 to measure our instruction-following capabilities.
| Model | AlpacaEval2.0 LC Win-rate (%) |
|---|---|
| Our runs | |
| DCLM-IT-7B | 16.6 |
| Mistral-7B w/ OpenHermes 2.5 | 15.4 |
| DCLM-Baseline-7B w/ OpenHermes 2.5 | 13.8 |
| Reported from the leaderboard | |
| LLaMA-3-Instruct-8B | 22.9 |
| Mistral-v0.2-7B | 17.1 |
| Mistral-7B w/ OpenHermes 2.5 | 16.2 |
| Zephyr-Beta-7B | 13.2 |
| Vicuna-v1.3-13B | 10.8 |
| Gemma-Instruct-7B | 10.4 |
| Nous-Hermes-13B | 9.7 |
| DaVinci001 | 9.0 |
| LLaMA-2-Chat-13B | 8.4 |
| Alpaca-7B | 5.9 |
This is example code on how to run the chat model.
from transformers import AutoTokenizer
from open_lm.utils.transformers.hf_config import OpenLMConfig
import torch
from open_lm.utils.transformers.hf_model import OpenLMConfig, OpenLMforCausalLM
# Load the model and tokenizer
model_name = "mlfoundations/dclm-it"
# Load the configuration, tokenizer, and model separately
config = OpenLMConfig.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = OpenLMforCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="cuda", config=config)
# Define the prompt format
def create_prompt(instruction):
PROMPT = '''Below is an instruction that describes a task.\n\nWrite a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:'''
return PROMPT.format(instruction=instruction)
# Example instruction
instruction = "Give me a poem about Sachin Tendulkar."
# Create the prompt
prompt = create_prompt(instruction)
# Tokenize the input
input_ids = tokenizer.encode(prompt, return_tensors="pt").to(torch.device('cuda'))
# Generate the response
output = model.generate(input_ids, max_length=500, top_p=.95, do_sample=True, temperature=0.3)
# Decode the response
response = tokenizer.decode(output[0][len(input_ids[0]):])
response = response.split("<|endoftext|>")[0]
# Print the response
print(response)
While DCLM-Baseline-7B demonstrates strong performance across a range of tasks, it's important to note:
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.
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}
}