OLMo is a series of Open Language Models designed to enable the science of language models.
The OLMo models are trained on the Dolma dataset.
We release all code, checkpoints, logs (coming soon), and details involved in training these models.
This model has been converted from allenai/OLMo-1B for the
Hugging Face Transformers format.
Model Details
The core models released in this batch are the following:
We are releasing many checkpoints for these models, for every 1000 training steps. These have not
yet been converted into Hugging Face Transformers format, but are available in allenai/OLMo-1B.
Model Description
Developed by: Allen Institute for AI (AI2)
Supported by: Databricks, Kempner Institute for the Study of Natural and Artificial Intelligence at Harvard University, AMD, CSC (Lumi Supercomputer), UW
Model type: a Transformer style autoregressive language model.
Language(s) (NLP): English
License: The code and model are released under Apache 2.0.
Contact: Technical inquiries: olmo at allenai dot org. Press: press at allenai dot org
Date cutoff: Feb./March 2023 based on Dolma dataset version.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf")3tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-1B-hf")4message =["Language modeling is"]5inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)6# optional verifying cuda7# inputs = {k: v.to('cuda') for k,v in inputs.items()}8# olmo = olmo.to('cuda')9response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)10print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])11>>'Language modeling is the first step to build natural language generation...'
Alternatively, with the pipeline abstraction:
python
1from transformers import pipeline
2olmo_pipe = pipeline("text-generation", model="allenai/OLMo-1B-hf")3print(olmo_pipe("Language modeling is "))4>>'Language modeling is a branch of natural language processing that aims to...'
Or, you can make this slightly faster by quantizing the model, e.g. AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf", torch_dtype=torch.float16, load_in_8bit=True) (requires bitsandbytes).
The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as inputs.input_ids.to('cuda') to avoid potential issues.
Fine-tuning
This model does not directly support our fine-tuning processes. Model fine-tuning can be done
from the final checkpoint or many intermediate checkpoints of
allenai/OLMo-1B.
Evaluation
Core model results for the 7B model are found below.
*Unlike OLMo, Pythia, and TinyLlama, StabilityAI has not disclosed yet the data StableLM was trained on, making comparisons with other efforts challenging.
Model Details
Data
For training data details, please see the Dolma documentation.
Architecture
OLMo 7B architecture with peer models for comparison.
OLMo 7B variants were either trained on MI250X GPUs at the LUMI supercomputer, or A100-40GB GPUs provided by MosaicML.
A summary of the environmental impact. Further details are available in the paper.
Like any base language model or fine-tuned model without safety filtering, it is relatively easy for a user to prompt these models to generate harmful and generally sensitive content.
Such content can also be produced unintentionally, especially in the case of bias, so we recommend users consider the risks of applications of this technology.
Otherwise, many facts from OLMo or any LLM will often not be true, so they should be checked.
Citation
BibTeX:
@article{Groeneveld2023OLMo,
title={OLMo: Accelerating the Science of Language Models},
author={Groeneveld, Dirk and Beltagy, Iz and Walsh, Pete and Bhagia, Akshita and Kinney, Rodney and Tafjord, Oyvind and Jha, Ananya Harsh and Ivison, Hamish and Magnusson, Ian and Wang, Yizhong and Arora, Shane and Atkinson, David and Authur, Russell and Chandu, Khyathi and Cohan, Arman and Dumas, Jennifer and Elazar, Yanai and Gu, Yuling and Hessel, Jack and Khot, Tushar and Merrill, William and Morrison, Jacob and Muennighoff, Niklas and Naik, Aakanksha and Nam, Crystal and Peters, Matthew E. and Pyatkin, Valentina and Ravichander, Abhilasha and Schwenk, Dustin and Shah, Saurabh and Smith, Will and Strubell, Emma and Subramani, Nishant and Wortsman, Mitchell and Dasigi, Pradeep and Lambert, Nathan and Richardson, Kyle and Zettlemoyer, Luke and Dodge, Jesse and Lo, Kyle and Soldaini, Luca and Smith, Noah A. and Hajishirzi, Hannaneh},
journal={Preprint},
year={2024}
}
APA:
Groeneveld, D., Beltagy, I., Walsh, P., Bhagia, A., Kinney, R., Tafjord, O., Jha, A., Ivison, H., Magnusson, I., Wang, Y., Arora, S., Atkinson, D., Authur, R., Chandu, K., Cohan, A., Dumas, J., Elazar, Y., Gu, Y., Hessel, J., Khot, T., Merrill, W., Morrison, J., Muennighoff, N., Naik, A., Nam, C., Peters, M., Pyatkin, V., Ravichander, A., Schwenk, D., Shah, S., Smith, W., Strubell, E., Subramani, N., Wortsman, M., Dasigi, P., Lambert, N., Richardson, K., Dodge, J., Zettlemoyer, L., Lo, K., Soldaini, L., Smith, N., & Hajishirzi, H. (2024). OLMo: Accelerating the Science of Language Models. Preprint.
Model Card Contact
For errors in this model card, contact Nathan, Akshita or Shane, {nathanl, akshitab, shanea} at allenai dot org.