Instructions to use allenai/OLMo-2-1124-13B-DPO-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/OLMo-2-1124-13B-DPO-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="allenai/OLMo-2-1124-13B-DPO-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-2-1124-13B-DPO-Preview") model = AutoModelForMultimodalLM.from_pretrained("allenai/OLMo-2-1124-13B-DPO-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use allenai/OLMo-2-1124-13B-DPO-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/OLMo-2-1124-13B-DPO-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/OLMo-2-1124-13B-DPO-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/allenai/OLMo-2-1124-13B-DPO-Preview
- SGLang
How to use allenai/OLMo-2-1124-13B-DPO-Preview with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "allenai/OLMo-2-1124-13B-DPO-Preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/OLMo-2-1124-13B-DPO-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "allenai/OLMo-2-1124-13B-DPO-Preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/OLMo-2-1124-13B-DPO-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use allenai/OLMo-2-1124-13B-DPO-Preview with Docker Model Runner:
docker model run hf.co/allenai/OLMo-2-1124-13B-DPO-Preview
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,7 +47,7 @@ The core models released in this batch include the following:
|
|
| 47 |
- Core repo (training, inference, fine-tuning etc.): https://github.com/allenai/OLMo
|
| 48 |
- Evaluation code: https://github.com/allenai/olmes
|
| 49 |
- Further fine-tuning code: https://github.com/allenai/open-instruct
|
| 50 |
-
- **Paper:**
|
| 51 |
- **Demo:** https://playground.allenai.org/
|
| 52 |
|
| 53 |
## Installation
|
|
@@ -142,5 +142,14 @@ For more information, please see our [Responsible Use Guidelines](https://allena
|
|
| 142 |
This model has been fine-tuned using a dataset mix with outputs generated from third party models and are subject to additional terms: [Gemma Terms of Use](https://ai.google.dev/gemma/terms).
|
| 143 |
|
| 144 |
## Citation
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
- Core repo (training, inference, fine-tuning etc.): https://github.com/allenai/OLMo
|
| 48 |
- Evaluation code: https://github.com/allenai/olmes
|
| 49 |
- Further fine-tuning code: https://github.com/allenai/open-instruct
|
| 50 |
+
- **Paper:** https://arxiv.org/abs/2501.00656
|
| 51 |
- **Demo:** https://playground.allenai.org/
|
| 52 |
|
| 53 |
## Installation
|
|
|
|
| 142 |
This model has been fine-tuned using a dataset mix with outputs generated from third party models and are subject to additional terms: [Gemma Terms of Use](https://ai.google.dev/gemma/terms).
|
| 143 |
|
| 144 |
## Citation
|
| 145 |
+
```
|
| 146 |
+
@misc{olmo20242olmo2furious,
|
| 147 |
+
title={2 OLMo 2 Furious},
|
| 148 |
+
author={Team OLMo and Pete Walsh and Luca Soldaini and Dirk Groeneveld and Kyle Lo and Shane Arora and Akshita Bhagia and Yuling Gu and Shengyi Huang and Matt Jordan and Nathan Lambert and Dustin Schwenk and Oyvind Tafjord and Taira Anderson and David Atkinson and Faeze Brahman and Christopher Clark and Pradeep Dasigi and Nouha Dziri and Michal Guerquin and Hamish Ivison and Pang Wei Koh and Jiacheng Liu and Saumya Malik and William Merrill and Lester James V. Miranda and Jacob Morrison and Tyler Murray and Crystal Nam and Valentina Pyatkin and Aman Rangapur and Michael Schmitz and Sam Skjonsberg and David Wadden and Christopher Wilhelm and Michael Wilson and Luke Zettlemoyer and Ali Farhadi and Noah A. Smith and Hannaneh Hajishirzi},
|
| 149 |
+
year={2024},
|
| 150 |
+
eprint={2501.00656},
|
| 151 |
+
archivePrefix={arXiv},
|
| 152 |
+
primaryClass={cs.CL},
|
| 153 |
+
url={https://arxiv.org/abs/2501.00656},
|
| 154 |
+
}
|
| 155 |
+
```
|