Text Generation
Transformers
Safetensors
gpt2
latent-reasoning
codi
slpo
reinforcement-learning
text-generation-inference
Instructions to use ModalityDance/slpo-codi-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModalityDance/slpo-codi-gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ModalityDance/slpo-codi-gpt2")# Load model directly from transformers import AutoTokenizer, LatentCODIGPT2 tokenizer = AutoTokenizer.from_pretrained("ModalityDance/slpo-codi-gpt2") model = LatentCODIGPT2.from_pretrained("ModalityDance/slpo-codi-gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ModalityDance/slpo-codi-gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModalityDance/slpo-codi-gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModalityDance/slpo-codi-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ModalityDance/slpo-codi-gpt2
- SGLang
How to use ModalityDance/slpo-codi-gpt2 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 "ModalityDance/slpo-codi-gpt2" \ --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": "ModalityDance/slpo-codi-gpt2", "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 "ModalityDance/slpo-codi-gpt2" \ --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": "ModalityDance/slpo-codi-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ModalityDance/slpo-codi-gpt2 with Docker Model Runner:
docker model run hf.co/ModalityDance/slpo-codi-gpt2
Update model card with arXiv 2607.19691
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ base_model: ModalityDance/latent-tts-codi
|
|
| 14 |
# CODI + SLPO (GPT-2)
|
| 15 |
|
| 16 |
Surrogate Latent Policy Optimization (**SLPO**) checkpoint on top of [CODI](https://huggingface.co/ModalityDance/latent-tts-codi) (GPT-2 124M).
|
| 17 |
-
This is the **CODI+SLPO** model reported in the paper *SLPO: Scaling Latent Reasoning
|
| 18 |
|
| 19 |
## Model Details
|
| 20 |
|
|
@@ -36,8 +36,8 @@ Deterministic accuracy with dropout disabled and learned stop gate:
|
|
| 36 |
|
| 37 |
## Related
|
| 38 |
|
| 39 |
-
- Paper (arXiv):
|
| 40 |
-
- Hugging Face Paper:
|
| 41 |
- Code: [ModalityDance/SLPO](https://github.com/ModalityDance/SLPO)
|
| 42 |
- Project page: [modalitydance.github.io/SLPO](https://modalitydance.github.io/SLPO/)
|
| 43 |
- Base model: [ModalityDance/latent-tts-codi](https://huggingface.co/ModalityDance/latent-tts-codi)
|
|
@@ -116,9 +116,12 @@ print(tokenizer.decode(sequences[0], skip_special_tokens=True))
|
|
| 116 |
|
| 117 |
```bibtex
|
| 118 |
@misc{you2026slpo,
|
| 119 |
-
title = {SLPO: Scaling Latent Reasoning
|
| 120 |
author = {You, Runyang and Liu, Zhiyuan and Li, Yongqi and Li, Wenjie},
|
| 121 |
year = {2026},
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
| 123 |
}
|
| 124 |
```
|
|
|
|
| 14 |
# CODI + SLPO (GPT-2)
|
| 15 |
|
| 16 |
Surrogate Latent Policy Optimization (**SLPO**) checkpoint on top of [CODI](https://huggingface.co/ModalityDance/latent-tts-codi) (GPT-2 124M).
|
| 17 |
+
This is the **CODI+SLPO** model reported in the paper *SLPO: Scaling Latent Reasoning via a Surrogate Policy*.
|
| 18 |
|
| 19 |
## Model Details
|
| 20 |
|
|
|
|
| 36 |
|
| 37 |
## Related
|
| 38 |
|
| 39 |
+
- Paper (arXiv): [2607.19691](https://arxiv.org/abs/2607.19691)
|
| 40 |
+
- Hugging Face Paper: [2607.19691](https://huggingface.co/papers/2607.19691)
|
| 41 |
- Code: [ModalityDance/SLPO](https://github.com/ModalityDance/SLPO)
|
| 42 |
- Project page: [modalitydance.github.io/SLPO](https://modalitydance.github.io/SLPO/)
|
| 43 |
- Base model: [ModalityDance/latent-tts-codi](https://huggingface.co/ModalityDance/latent-tts-codi)
|
|
|
|
| 116 |
|
| 117 |
```bibtex
|
| 118 |
@misc{you2026slpo,
|
| 119 |
+
title = {SLPO: Scaling Latent Reasoning via a Surrogate Policy},
|
| 120 |
author = {You, Runyang and Liu, Zhiyuan and Li, Yongqi and Li, Wenjie},
|
| 121 |
year = {2026},
|
| 122 |
+
eprint = {2607.19691},
|
| 123 |
+
archivePrefix = {arXiv},
|
| 124 |
+
primaryClass = {cs.CL},
|
| 125 |
+
url = {https://arxiv.org/abs/2607.19691}
|
| 126 |
}
|
| 127 |
```
|