Instructions to use UW/OLMo2-8B-BPE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UW/OLMo2-8B-BPE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UW/OLMo2-8B-BPE")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("UW/OLMo2-8B-BPE") model = AutoModelForCausalLM.from_pretrained("UW/OLMo2-8B-BPE", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use UW/OLMo2-8B-BPE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UW/OLMo2-8B-BPE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UW/OLMo2-8B-BPE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/UW/OLMo2-8B-BPE
- SGLang
How to use UW/OLMo2-8B-BPE 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 "UW/OLMo2-8B-BPE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UW/OLMo2-8B-BPE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "UW/OLMo2-8B-BPE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UW/OLMo2-8B-BPE", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use UW/OLMo2-8B-BPE with Docker Model Runner:
docker model run hf.co/UW/OLMo2-8B-BPE
|
Download README.md from UW/OLMo2-8B-BPE: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/UW/OLMo2-8B-BPE/resolve/main/README.md
- Command line
-
hf download hf://UW/OLMo2-8B-BPE/README.md
-
curl -L -o README.md https://huggingface.co/UW/OLMo2-8B-BPE/resolve/main/README.md
1.2 kB
metadata
license: apache-2.0
language:
- en
library_name: transformers
datasets:
- allenai/olmo-mix-1124
BPE Baseline
This 8B model was trained from scratch with a traditional subword BPE tokenizer, and serves as our baseline in experiments.
The model was trained with the Olmo2 7B architecture and pretraining data. It has a context length of 4,096 tokens and is trained on 321B tokens. The tokenizer has a vocabulary size of 200k.
Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("UW/OLMo2-8B-BPE")
model = AutoModelForCausalLM.from_pretrained("UW/OLMo2-8B-BPE")
tokenizer.convert_ids_to_tokens(tokenizer.encode("By the way, I am a fan of the Milky Way."))
# ['By', 'Ġthe', 'Ġway', ',', 'ĠI', 'Ġam', 'Ġa', 'Ġfan', 'Ġof', 'Ġthe', 'ĠMilky', 'ĠWay', '.']
Citation
@misc{liu-etal-2025-superbpe,
title={SuperBPE: Space Travel for Language Models},
author={Alisa Liu and Jonathan Hayase and Valentin Hofmann and Sewoong Oh and Noah A. Smith and Yejin Choi},
year={2025},
eprint={2503.13423},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.13423},
}