Feat/explanation quality l2r#1
Open
gray311 wants to merge 5 commits into
Open
Conversation
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.