Repository navigation
perf: integrate opt-in DualVLN KV cache with an isolated A/B pilot - #1
Closed
GeeniTiming wants to merge 4 commits into
Closed
GeeniTiming wants to merge 4 commits into
GeeniTiming wants to merge 4 commits into
Conversation
Build on Max Fan's upstream PR InternRobotics#368 (2a8e57e), preserving its commits and default-off implementation. Add create-only experiment preparation, per-episode seeds, complete Habitat action/pose comparison, optional stage timing, input fingerprints, GPU process snapshots and CPU regression tests. Validation: 34 CPU tests pass on PyTorch 2.6.0 / Transformers 4.51.0; Flake8 and Python 3.9 syntax checks pass. Real checkpoint BF16/Habitat speed and full SR/SPL remain unvalidated on the user's server.
Keep the native full-replay policy in control and compare both readouts from the same generation. Repeat native readout and S1 calls, restore shadow RNG states, preserve cache prefixes, and gate paired action evidence on native trace reproduction. Production model, evaluator, and existing pilot code stay unchanged. Document the server's A/A exact match and A/B action divergence; do not treat matching metrics or shadow timings as equivalent policy performance.
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.
DualVLN's latent readout repeats image encoding and prefix computation after goal generation. This branch integrates the default-off KV-cache continuation from upstream PR #368, preserving Max Fan's original commits, and adds a bounded, seeded A/B pilot for this fork.
The pilot locks a declared episode subset, writes separate results, records all actual Habitat actions and poses, checks input/code fingerprints, and optionally profiles S2, latent readout, S1 and simulator stages. The 操作说明 now follows the user's existing-checkout workflow; no extra project directory is required.
Server observations reported by the user on one uncapped episode: native A/A runs match all 308 actions and poses exactly. Native/cache A/B runs have identical SR, SPL and NE, but differ first at actual action index 71. Observed shared-card times were 43.329 / 37.944 seconds (12.4% less time in this single pair). This is evidence against assuming behavior equivalence, not a stable speed claim or full SR/SPL validation.
A new independent paired diagnostic keeps the native policy acting, compares readouts from the same generation, and repeats original readout/S1 calls. S1 uses the same RNG state for both latents; shadows restore Python/NumPy/Torch/CUDA RNG, check preserved cache prefixes, and clone trajectories before the in-place action decoder. Its output is gated on native trace reproduction and native repeatability. Diagnostic timing is explicitly invalid for speed comparisons. The production model, evaluator, and existing pilot helper are unchanged by the diagnostic addition, so earlier pilot fingerprints remain usable.
Validation: 41 CPU tests passed on Python 3.12 / PyTorch 2.6.0 / Transformers 4.51.0, including RNG isolation, exception restoration, and actual DynamicCache append/crop behavior; Flake8 and Python 3.9 syntax checks passed. The new paired diagnostic still needs real A800 BF16/FlashAttention/Habitat execution. Cache acceleration remains opt-in and unmerged; this is engineering work, not a navigation-recovery algorithm contribution.