Skip to content

path: remove avg-pool, attend over spatial tokens - #59

Open
haraschax wants to merge 22 commits into
mainfrom
spatial-unvision
Open

path: remove avg-pool, attend over spatial tokens#59
haraschax wants to merge 22 commits into
mainfrom
spatial-unvision

Conversation

@haraschax

Copy link
Copy Markdown

No description provided.

@haraschax haraschax changed the title path: remove avg-pool, attend over spatial tokens path: add spatial unvision decoder Aug 18, 2026
@haraschax
haraschax changed the base branch from main to spatial-avgpool August 18, 2026 02:05
@haraschax haraschax changed the title path: add spatial unvision decoder path: remove avg-pool, attend over spatial tokens Aug 18, 2026
@haraschax
haraschax changed the base branch from spatial-avgpool to main August 18, 2026 04:04
@haraschax
haraschax force-pushed the spatial-unvision branch 11 times, most recently from f6484c4 to 930e80f Compare August 19, 2026 04:40
Port the rldriving experiment onto the spatial temporal policy: a shared
_temporal_policy_config in path/config_registry guarantees actor parity with
the path model warm-start, features are (B,T,S,C), and the dataloader and
validator use the current xx APIs.
The temporal summarizer tokens are time-major (t * spatial_size), so the
naive supercombo attention needs a frame-granular causal mask. The spatial
vision output is (S, C) per frame - flatten it into the 1-D hidden_state so
openpilot can feed it back as features_buffer.
Drop the fixed 2D sincos positional encoding in favor of a learned
nn.Embedding, matching the rest of the path model. Removes the dependency
on xx.training.lib.positional_embeddings.
Spatial tokens in the temporal summarizer now attend causally over the
time-major (t*s) sequence instead of block-causal. Slightly weird but
simpler — removes causal_block_size and the hand-rolled mask.
Drop the 4-layer transformer decoder in favor of a simple conv upsampler
that takes the spatial feature grid (b, s, c) -> (b, c, grid_h, grid_w)
and upsamples to two RGB views. Matches the xx TinyUnvision approach but
keeps the spatial tokens instead of pooling.
Unvision is no longer optional — the decoder is always built and always
runs. Removes the unvision flag from model config, config registry, and
dataset config.
TEMPORAL_INPUTS[FEATURES] is now (spatial_size, vision_features) instead
of (512,). The checkpoint config uses TEMPORAL_INPUTS directly instead of
hardcoding spatial_size and VISION_FEATURES. Constants moved to
model_constants.py.
Don't add is_causal parameter to _attention — the one non-causal caller
(PointSummarizer) builds the config inline with is_causal=False instead.
Revert the conv decoder back to the 4-layer transformer SpatialUnvision
with learned positional embedding. Unvision stays always-on (no option).
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