Skip to content

[Feature] Add opt-in KV-cache continuation for DualVLN evaluation - #368

Open
maxfanxd wants to merge 2 commits into
InternRobotics:mainfrom
maxfanxd:feat/dualvln-kv-cache-continuation
Open

[Feature] Add opt-in KV-cache continuation for DualVLN evaluation#368
maxfanxd wants to merge 2 commits into
InternRobotics:mainfrom
maxfanxd:feat/dualvln-kv-cache-continuation

Conversation

@maxfanxd

@maxfanxd maxfanxd commented Sep 5, 2026

Copy link
Copy Markdown

Description

This adds --kv-cache-continuation to the existing Habitat DualVLN evaluator. It reuses the generation KV cache for latent readout, avoiding repeated image encoding and prefix computation.

The flag is off by default. Without it, evaluation uses the original generate_latents path. Existing configs, dependencies and the root README are unchanged.

Usage

PYTHONPATH=. python scripts/eval/eval.py \
  --config scripts/eval/configs/habitat_dual_system_cfg.py \
  --kv-cache-continuation

Validation

23 CPU regression tests pass, covering default behavior, numerical agreement, cache boundaries and cleanup.

A small Habitat R2R test with the complete model on RTX A6000 (BF16):

Measurement Full replay Continuation
Latent readout, mean of 7 paired per-call medians 540.25 ms 31.23 ms
Two capped episodes, one run per mode 39.63 s 35.91 s

This is 17.30x faster latent readout, not 17.30x faster navigation. All 433 simulator actions matched in the two runs; mean latent query cosine was 0.999700.

Impact on success rate: Both modes recorded SR/SPL of 0 on these two episodes, which hit the configured 40-step cap without success. The matching action sequences provide a small integration check, not evidence of unchanged full-dataset success rate. A full SR/SPL comparison remains to be done.

BF16 outputs are not bitwise equal and could affect other trajectories, so the optimization remains opt-in. Robot deployment has not been tested.

Tests and measurement details

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