Skip to content

Feat/explanation quality l2r#1

Open
gray311 wants to merge 5 commits into
mainfrom
feat/explanation-quality-l2r
Open

Feat/explanation quality l2r#1
gray311 wants to merge 5 commits into
mainfrom
feat/explanation-quality-l2r

Conversation

@gray311

@gray311 gray311 commented May 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

ext-yingzima and others added 5 commits May 28, 2026 21:38
torchao_utils: skip the torchao.quantization import entirely when no
quantization is requested. Newer torchao (>=0.17) dropped
float8_dynamic_activation_float8_weight, so the unconditional import
crashed model load even with torchao_config="".

scripts: point hardcoded ROOT at the local clone so the eval package and
data resolve when running from this checkout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add dllm_template_explanation_l2r sampling param, threaded through
schedule_batch -> forward_batch_info -> HierarchyBlock.

When set, HierarchyBlock._fill_template_l2r commits the explanation
(rep-penalty) positions strictly left-to-right, ONE token per forward,
while structured (non-rep) masks still fill in parallel via confidence
top-K. One-at-a-time L2R lets each explanation token condition on all
tokens already committed to its left, which removes the parallel-commit
BPE-boundary glue ("cyclistsists", "sunnycast") that confidence top-K
produces on a long free-text run. Costs ~1 extra forward per explanation
token (image prefill is cached, so ~+0.5s end-to-end). Other slots'
commit order is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Loader (fast_dvlm_sglang_v3):
- steps_per_chunk 4 -> 16 (coherence: each committed token sees more
  already-decided neighbors).
- explanation_l2r default True (uses the fork's strict-L2R fill).
- rep_penalty default is now mode-aware: 0.0 under L2R (one-at-a-time
  decoding doesn't repeat, and a nonzero penalty there forces subword
  fragments like "overcast"->"scast"); 4.0 for the parallel path.
- nav-conditional lateral gate: navigation_command is an INPUT, so force
  the lateral verb to match it (LEFT/RIGHT -> turn/change + left/right;
  STRAIGHT -> keep + lane). Deterministic 5/5 nav, robust to steps/length
  unlike the fragile soft nav-injection.
- _truncate_explanation_bleed: drop any field-name / trajectory-number
  tail that leaks into the explanation prose, keeping the coherent prefix.

template_v3: N_EXPLANATION_TOKENS is overridable via
DVLA_N_EXPLANATION_TOKENS (default kept at 100).

scripts: sweep_explanation_quality (steps x rep), sweep_explanation_length,
and an A/B worker (parallel vs L2R).

Validated on 5- and 10-sample Waymo: lateral 10/10, schema 12/12,
0 glue/fragment artifacts, ~3.0s. test_image (OOD fire scene) now reads
coherently and behavior is "slow down" + "keep lane".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ROOT = dirname(dirname(abspath(__file__))) — the repo root is the parent
of scripts/, so the scripts run from any checkout location without editing
the path. Replaces the hardcoded /weka/.../dVLA-AD[-ad4fcc21] literal in all
21 scripts (added `import os` where it was missing). External resource paths
(the Waymo val json, Fast_dVLM_3B weights) stay hardcoded — they aren't part
of the repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Final tuned-pipeline outputs for record:
- waymo_5_compare/fast_dvlm_sglang_v3_mdm.json : 5-sample, L2R + nav gate
  + rep_penalty=0 (lateral 5/5, schema 12/12, no glue).
- waymo_5_compare/fast_dvlm_raw.json           : transformers-loader compare.
- waymo_5_compare/explanation_sweep_mdm.json   : steps x rep sweep.
- waymo_10_compare/sglang.json                 : 10-sample (lateral 10/10,
  schema 10/10, 0 glue, ~3.0s).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant