Instructions to use ModalityDance/latent-tts-colar with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModalityDance/latent-tts-colar with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ModalityDance/latent-tts-colar") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, ColarLlama tokenizer = AutoTokenizer.from_pretrained("ModalityDance/latent-tts-colar") model = ColarLlama.from_pretrained("ModalityDance/latent-tts-colar") 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
- vLLM
How to use ModalityDance/latent-tts-colar with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModalityDance/latent-tts-colar" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModalityDance/latent-tts-colar", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModalityDance/latent-tts-colar
- SGLang
How to use ModalityDance/latent-tts-colar 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/latent-tts-colar" \ --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": "ModalityDance/latent-tts-colar", "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 "ModalityDance/latent-tts-colar" \ --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": "ModalityDance/latent-tts-colar", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModalityDance/latent-tts-colar with Docker Model Runner:
docker model run hf.co/ModalityDance/latent-tts-colar
Add pipeline tag and paper/code links
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
license: mit
|
| 4 |
base_model:
|
| 5 |
- meta-llama/Llama-3.2-1B-Instruct
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
|
|
|
| 7 |
# CoLaR Model
|
| 8 |
|
| 9 |
<div align="center">
|
|
@@ -14,7 +16,10 @@ base_model:
|
|
| 14 |
|
| 15 |
## Overview
|
| 16 |
|
| 17 |
-
**CoLaR** (Compressed Latent Reasoning) is a latent reasoning model based on LLaMA that uses a specialized LatentHead module for generating continuous latent representations. This model is part of the [Parallel Test-Time Scaling for Latent Reasoning Models](https://
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Model Details
|
| 20 |
|
|
@@ -201,7 +206,7 @@ Run evaluation using the provided scripts:
|
|
| 201 |
|
| 202 |
## Model Card
|
| 203 |
|
| 204 |
-
- **Paper**: [Parallel Test-Time Scaling for Latent Reasoning Models](https://
|
| 205 |
- **HuggingFace**: [ModalityDance/latent-tts-colar](https://huggingface.co/ModalityDance/latent-tts-colar)
|
| 206 |
- **Benchmarks**: GSM8K Test, GSM8K Hard, MultiArith
|
| 207 |
|
|
@@ -235,4 +240,4 @@ If you use this model, please cite:
|
|
| 235 |
primaryClass={cs.CL},
|
| 236 |
url={https://arxiv.org/abs/2505.16552},
|
| 237 |
}
|
| 238 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
base_model:
|
| 3 |
- meta-llama/Llama-3.2-1B-Instruct
|
| 4 |
+
library_name: transformers
|
| 5 |
+
license: mit
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
+
|
| 9 |
# CoLaR Model
|
| 10 |
|
| 11 |
<div align="center">
|
|
|
|
| 16 |
|
| 17 |
## Overview
|
| 18 |
|
| 19 |
+
**CoLaR** (Compressed Latent Reasoning) is a latent reasoning model based on LLaMA that uses a specialized LatentHead module for generating continuous latent representations. This model is part of the [Parallel Test-Time Scaling for Latent Reasoning Models](https://huggingface.co/papers/2510.07745) framework.
|
| 20 |
+
|
| 21 |
+
- **Paper:** [Parallel Test-Time Scaling for Latent Reasoning Models](https://huggingface.co/papers/2510.07745)
|
| 22 |
+
- **Code:** [https://github.com/ModalityDance/LatentTTS](https://github.com/ModalityDance/LatentTTS)
|
| 23 |
|
| 24 |
## Model Details
|
| 25 |
|
|
|
|
| 206 |
|
| 207 |
## Model Card
|
| 208 |
|
| 209 |
+
- **Paper**: [Parallel Test-Time Scaling for Latent Reasoning Models](https://huggingface.co/papers/2510.07745)
|
| 210 |
- **HuggingFace**: [ModalityDance/latent-tts-colar](https://huggingface.co/ModalityDance/latent-tts-colar)
|
| 211 |
- **Benchmarks**: GSM8K Test, GSM8K Hard, MultiArith
|
| 212 |
|
|
|
|
| 240 |
primaryClass={cs.CL},
|
| 241 |
url={https://arxiv.org/abs/2505.16552},
|
| 242 |
}
|
| 243 |
+
```
|