Instructions to use UW/OLMo2-8B-SuperBPE-t80k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UW/OLMo2-8B-SuperBPE-t80k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="UW/OLMo2-8B-SuperBPE-t80k")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("UW/OLMo2-8B-SuperBPE-t80k") model = AutoModelForCausalLM.from_pretrained("UW/OLMo2-8B-SuperBPE-t80k") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use UW/OLMo2-8B-SuperBPE-t80k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "UW/OLMo2-8B-SuperBPE-t80k" # 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-SuperBPE-t80k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/UW/OLMo2-8B-SuperBPE-t80k
- SGLang
How to use UW/OLMo2-8B-SuperBPE-t80k 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-SuperBPE-t80k" \ --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-SuperBPE-t80k", "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-SuperBPE-t80k" \ --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-SuperBPE-t80k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use UW/OLMo2-8B-SuperBPE-t80k with Docker Model Runner:
docker model run hf.co/UW/OLMo2-8B-SuperBPE-t80k
SuperBPE
This 8B model was trained from scratch with a SuperBPE tokenizer. SuperBPE extends the BPE algorithm to include both traditional subword tokens (contained within word boundaries), as well as new superword tokens (containing parts of multiple words)! Due to encoding the same amount of text in fewer tokens, this model is 33% more efficient at inference-time on average compared to a model trained with BPE.
The model was trained with the Olmo2 7B architecture and pretraining data. It has a context length of 2,756 tokens (to match the effective context size in bytes of a BPE model with a context length of 4,096 tokens), and is trained on 334B tokens. The tokenizer has a vocabulary size of 200k and transitions from learning subword to learning superword tokens at vocabulary size of 80k.
Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("UW/OLMo2-8B-SuperBPE-t180k")
model = AutoModelForCausalLM.from_pretrained("UW/OLMo2-8B-SuperBPE-t180k")
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},
}
- Downloads last month
- 97