omar81939 commited on
Commit
84a9e65
·
verified ·
1 Parent(s): 7e7e20d

Simplify model card to usage

Browse files
Files changed (1) hide show
  1. README.md +9 -92
README.md CHANGED
@@ -11,104 +11,21 @@ tags:
11
  - math
12
  ---
13
 
14
- # Ouro-1.4B-Thinking — depth-as-action GRPO (step 400)
15
-
16
- RL fine-tune of [ByteDance/Ouro-1.4B-Thinking](https://huggingface.co/ByteDance/Ouro-1.4B-Thinking)
17
- in which the **loop count `r` is part of the RL action and is priced**. Trained with GRPO for 400
18
- steps, rolling out every prompt at `r ∈ {2, 4, 8, 16}` with advantages computed *across* depth
19
- groups and a linear cost `λ·(r/16)`, `λ = 0.1`.
20
-
21
- **Depths `r = 24` and `r = 32` were never rolled out during RL.** They are evaluation-only.
22
-
23
- Initialized from the SFT baseline
24
- [`omar81939/Ouro-1.4B-Thinking-depth-SFT`](https://huggingface.co/omar81939/Ouro-1.4B-Thinking-depth-SFT) (called **W-A** below) — you need that checkpoint to
25
- reproduce the comparison, because every number here is GRPO-vs-W-A, not GRPO-vs-base-Ouro.
26
-
27
- ## What this checkpoint does and does not do
28
-
29
- **Read this before quoting a number.**
30
-
31
- - It substantially repairs the base model's collapse at loop depths beyond the trained horizon.
32
- - It does **not** make depth buy accuracy. This model's own accuracy still *falls* monotonically
33
- with `r`: 0.840 → 0.802 → 0.660 → 0.478 across `r = 4/16/24/32`. Deeper is still worse.
34
- - The mechanism is largely **termination**, not reasoning. At `r = 32` the W-A baseline hits the
35
- 3,072-token budget on 84.4% of MATH-500 problems versus 17.2% for this model, and of the 168
36
- problems this model gets right where W-A fails, 160 are cases where W-A ran out of tokens or
37
- never emitted a boxed answer.
38
- - It is a **single training seed** (1234) evaluated on **MATH-500 only**. A confirmation run on a
39
- second seed and an objective ablation (`λ = 0`, within-depth advantages) were pre-registered and
40
- had not run when this was uploaded.
41
- - The model also carries a depth-selection head trained against `Q(r) = mean reward − λ·(r/16)`,
42
- but the sampler never consulted it during training and its behavior was never evaluated. **No
43
- adaptive per-prompt depth allocation is claimed.**
44
-
45
- ## Results
46
-
47
- MATH-500, greedy, 3,072-token budget, n = 500. `trunc` = share of generations that hit the budget.
48
-
49
- | depth | base Ouro | W-A (SFT) acc / trunc | this model acc / trunc | Δ acc |
50
- |---|---|---|---|---|
51
- | r = 4 | 0.710 | 0.676 / 34.6% | **0.840** / 6.2% | +16.4 |
52
- | r = 16 | 0.058 | 0.620 / 38.8% | **0.802** / 5.6% | +18.2 |
53
- | r = 24 (never trained) | 0.004 | 0.378 / 62.0% | **0.660** / 8.6% | +28.2 |
54
- | r = 32 (never trained) | 0.000 | 0.178 / 84.4% | **0.478** / 17.2% | +30.0 |
55
-
56
- A pre-registered gate — the falloff from `r = 16` must be shallower than the baseline's, judged on
57
- a paired item-level bootstrap (20,000 draws, Bonferroni-adjusted 97.5% lower bounds) — passed at
58
- both untrained depths: `W(24) = +10.0` (LB +3.8) and `W(32) = +11.8` (LB +4.8). The identical
59
- analysis **failed** 50 steps earlier at step 350 (LBs −1.0 and −0.8), which is why the
60
- single-seed caveat above matters.
61
-
62
- ## Usage
63
-
64
- The loop count is a config field, `total_ut_steps`. It is read at model-construction time, so set
65
- it when you load:
66
 
67
  ```python
68
  from transformers import AutoModelForCausalLM, AutoTokenizer
69
 
70
  REPO = "omar81939/Ouro-1.4B-Thinking-depth-GRPO"
71
- tok = AutoTokenizer.from_pretrained(REPO)
 
 
72
  model = AutoModelForCausalLM.from_pretrained(
73
- REPO, trust_remote_code=True, dtype="bfloat16",
74
- total_ut_steps=16, # <- the dial: 2, 4, 8, 16 were trained; 24/32 are out of support
 
 
75
  )
76
  ```
77
 
78
- With vLLM, pass it as an engine override (`hf_overrides={"total_ut_steps": r}`) — it cannot be
79
- changed per-request after engine init.
80
-
81
- The exported weights are BF16 and the config ships `total_ut_steps: 4`, matching the base model's
82
- default. Evaluation numbers above were produced by overriding it per run.
83
-
84
- ## Training
85
-
86
- | | |
87
- |---|---|
88
- | Base | ByteDance/Ouro-1.4B-Thinking → SFT (W-A) → GRPO |
89
- | RL steps | 400 |
90
- | Rollouts | 48 prompts × 4 depths × 4 generations = 768 sequences/step |
91
- | Depths sampled | r ∈ {2, 4, 8, 16} |
92
- | Reward | first-boxed-answer correctness, + a small bonus for emitting a parseable box |
93
- | Depth pricing | `Q(r) = mean reward − λ·(r/16)`, λ = 0.1, advantages across depth groups |
94
- | Prompts | DeepScaleR, decontaminated against every eval set, pass@8-filtered → 8,932 prompts |
95
- | Hardware | 8 × H100, ~23 days wall clock on preemptible partitions |
96
- | Sampling (train) | temperature 1.0, top-p 1.0, 2,048-token responses |
97
-
98
- The run was bitwise deterministic: every step logged parity records (307,200 sequence-level
99
- comparisons across the run, zero failures), roughly 40 preemptions all replayed byte-identically,
100
- and a mid-run migration reproduced a step byte-for-byte on a different cluster on another
101
- continent.
102
-
103
- ## Limitations
104
-
105
- Single seed. One benchmark. Math only. English only. The base model's own card notes it is a
106
- research artifact, not a production model, and that applies here at least as strongly. Deeper loop
107
- counts cost proportionally more compute for *lower* accuracy on this checkpoint, so there is no
108
- setting of `r` above 4 that is recommended for use — the interest here is scientific.
109
-
110
- ## License and attribution
111
-
112
- Apache-2.0, inherited from the base model. Base weights © ByteDance Seed, from
113
- [Ouro-1.4B-Thinking](https://huggingface.co/ByteDance/Ouro-1.4B-Thinking) — see
114
- ["Scaling Latent Reasoning via Looped Language Models"](https://arxiv.org/abs/2510.25741).
 
11
  - math
12
  ---
13
 
14
+ # Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ```python
17
  from transformers import AutoModelForCausalLM, AutoTokenizer
18
 
19
  REPO = "omar81939/Ouro-1.4B-Thinking-depth-GRPO"
20
+ DEPTH = 16
21
+
22
+ tokenizer = AutoTokenizer.from_pretrained(REPO)
23
  model = AutoModelForCausalLM.from_pretrained(
24
+ REPO,
25
+ trust_remote_code=True,
26
+ dtype="bfloat16",
27
+ total_ut_steps=DEPTH,
28
  )
29
  ```
30
 
31
+ With vLLM, set `hf_overrides={"total_ut_steps": DEPTH}` when creating the engine.