path: remove avg-pool, attend over spatial tokens - #59
Open
haraschax wants to merge 22 commits into
Open
Conversation
haraschax
force-pushed
the
spatial-unvision
branch
from
August 18, 2026 02:05
a518635 to
2f215a5
Compare
haraschax
force-pushed
the
spatial-unvision
branch
11 times, most recently
from
August 19, 2026 04:40
f6484c4 to
930e80f
Compare
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.
This reverts commit 2899259.
This reverts commit 930e80f.
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).
haraschax
force-pushed
the
spatial-unvision
branch
from
August 21, 2026 23:58
f4785b5 to
81be2ca
Compare
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.