Commit fcbd61a
committed
Fix Bug #1: Read tau_d from target temperature, not draft_temperature
CRITICAL FIX: tau_d was reading draft_temperature (0.05) instead of
target temperature from sampling_metadata (1.0).
This caused:
- tau_q = 0.05 + 0.3 = 0.35 (before)
- Logit gap = 10/0.35 = 28.6 → exp(-28.6) ≈ 0 (underflow!)
- q collapses to 0.98-1.0
After fix:
- tau_d = 1.0 (from sampling_metadata.temperature)
- tau_q = 1.0 + 0.3 = 1.3
- Logit gap = 10/1.3 = 7.7 → exp(-7.7) = 0.00045 (survives!)
- q should be in [0.5, 0.8] range
Changes:
- propose(): Store sampling_metadata as self._current_sampling_metadata
- _sample_draft_tokens(): Read tau_d from sampling_metadata, not opt_config1 parent a530c97 commit fcbd61a
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
324 | 327 | | |
325 | 328 | | |
326 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| |||
0 commit comments