Text Generation
Transformers
Safetensors
gpt2
latent-reasoning
continuous-thought
coconut
grpo
reinforcement-learning
text-generation-inference
Instructions to use jihwan1205/svp-v-coconut-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jihwan1205/svp-v-coconut-gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jihwan1205/svp-v-coconut-gpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jihwan1205/svp-v-coconut-gpt2") model = AutoModelForCausalLM.from_pretrained("jihwan1205/svp-v-coconut-gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jihwan1205/svp-v-coconut-gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jihwan1205/svp-v-coconut-gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jihwan1205/svp-v-coconut-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jihwan1205/svp-v-coconut-gpt2
- SGLang
How to use jihwan1205/svp-v-coconut-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 "jihwan1205/svp-v-coconut-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": "jihwan1205/svp-v-coconut-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 "jihwan1205/svp-v-coconut-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": "jihwan1205/svp-v-coconut-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jihwan1205/svp-v-coconut-gpt2 with Docker Model Runner:
docker model run hf.co/jihwan1205/svp-v-coconut-gpt2
Align model card and weights with ICLR 2027 paper
Browse files- README.md +12 -6
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -19,13 +19,19 @@ datasets:
|
|
| 19 |
A [COCONUT](https://huggingface.co/ModalityDance/latent-tts-coconut) GPT-2 (124M)
|
| 20 |
latent-reasoning model post-trained with **SVP-V-GRPO** — reinforcement learning whose
|
| 21 |
rollout exploration comes from *weight-space* perturbation of the attention value
|
| 22 |
-
projections
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
Only the value-projection weights (the V columns of each `c_attn`) differ from the base
|
| 26 |
checkpoint. The perturbation is a training-time exploration mechanism and is **not** used
|
| 27 |
at deployment: inference is ordinary greedy decoding.
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## Results
|
| 30 |
|
| 31 |
Clean greedy decoding, `max_new_tokens=64`, exact-match on the final answer; all rows
|
|
@@ -69,11 +75,11 @@ COCONUT inference code works as well.
|
|
| 69 |
| | |
|
| 70 |
|---|---|
|
| 71 |
| Base | `ModalityDance/latent-tts-coconut` (COCONUT GPT-2, 124M) |
|
| 72 |
-
| Data | [GSM8K-Aug](https://huggingface.co/datasets/zen-E/GSM8k-Aug)
|
| 73 |
-
| Algorithm | GRPO
|
| 74 |
-
| Exploration | SVP
|
| 75 |
| Trained parameters | V columns of every `c_attn` (≈ 7M of 124M) |
|
| 76 |
-
| Optimizer | AdamW, constant lr,
|
| 77 |
| Reward | Final-answer correctness only |
|
| 78 |
|
| 79 |
## Limitations
|
|
|
|
| 19 |
A [COCONUT](https://huggingface.co/ModalityDance/latent-tts-coconut) GPT-2 (124M)
|
| 20 |
latent-reasoning model post-trained with **SVP-V-GRPO** — reinforcement learning whose
|
| 21 |
rollout exploration comes from *weight-space* perturbation of the attention value
|
| 22 |
+
projections. For each layer and rollout, SVP independently samples Gaussian noise and
|
| 23 |
+
rescales coefficients in the fixed SVD basis of `W_V` as `sᵢ → sᵢ(1+αgᵢ)`. The resulting
|
| 24 |
+
coefficients can be negative and are not necessarily singular values of the perturbed
|
| 25 |
+
matrix.
|
| 26 |
|
| 27 |
Only the value-projection weights (the V columns of each `c_attn`) differ from the base
|
| 28 |
checkpoint. The perturbation is a training-time exploration mechanism and is **not** used
|
| 29 |
at deployment: inference is ordinary greedy decoding.
|
| 30 |
|
| 31 |
+
This repository contains the paper's GPT-2 SVP-V-GRPO checkpoint from epoch 9 of the
|
| 32 |
+
15-epoch `B=32`, `lr=6e-5`, seed-0 run. The results below are the paper's Figure 3
|
| 33 |
+
evaluations; they have not been independently rerun for this model-card update.
|
| 34 |
+
|
| 35 |
## Results
|
| 36 |
|
| 37 |
Clean greedy decoding, `max_new_tokens=64`, exact-match on the final answer; all rows
|
|
|
|
| 75 |
| | |
|
| 76 |
|---|---|
|
| 77 |
| Base | `ModalityDance/latent-tts-coconut` (COCONUT GPT-2, 124M) |
|
| 78 |
+
| Data | 383,891 eligible prompts from [GSM8K-Aug](https://huggingface.co/datasets/zen-E/GSM8k-Aug) |
|
| 79 |
+
| Algorithm | GRPO: `G=32` rollouts per prompt; `2B=64` candidate prompts per iteration with up to `B=32` mixed-outcome groups retained; `μ=2` optimization passes; centered advantages; symmetric clipping `ε=0.2`; k3 KL (`β=0.02`) to the frozen base |
|
| 80 |
+
| Exploration | SVP with `α=0.6`: independent Gaussian coefficient perturbations for each Value-projection layer and rollout, held fixed through prefill and all six latent steps; clean answer decoding; SVD factors refreshed every 50 iterations |
|
| 81 |
| Trained parameters | V columns of every `c_attn` (≈ 7M of 124M) |
|
| 82 |
+
| Optimizer | AdamW, constant `lr=6e-5`, seed 0, no warmup or weight decay, gradient clipping at 1.0; epoch-9 checkpoint from 15 epochs |
|
| 83 |
| Reward | Final-answer correctness only |
|
| 84 |
|
| 85 |
## Limitations
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497783424
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b1d2bd8d54ca467cf05339562173a4e8f0742c4a84e24059cfdef6b8ea05402
|
| 3 |
size 497783424
|