Skip to content

perf: integrate opt-in DualVLN KV cache with an isolated A/B pilot - #1

Closed
GeeniTiming wants to merge 4 commits into
mainfrom
perf/dualvln-cache-pilot
Closed

GeeniTiming wants to merge 4 commits into
mainfrom
perf/dualvln-cache-pilot

Conversation

@GeeniTiming

@GeeniTiming GeeniTiming commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

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.

maxfanxd and others added 4 commits September 5, 2026 07:32
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.
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.

2 participants