Views
No views yet
| Input | Latent | Compression | |
|---|---|---|---|
| Tokens | 576 (24×24) | 36 (6×6) | 16x spatial |
| Channels | 1152 | 32 | 36x channel |
| Total values | 663,552 | 1,152 | 576x |
| Metric | Value |
|---|---|
| Eval CosSim (feature reconstruction) | 0.9648 |
| VLM Chess MCQ Accuracy | 3/20 (15%) |
| VLM Agreement with uncompressed baseline | 18/20 (90%) |
fae_encoder.pt — Spatial FAE encoder weightsfeature_decoder.pt — Spatial FAE decoder weightstraining_state.pt — Training metadata + feature normalization statsfae_spatial.py — Model architecture source code1import torch
2from fae_spatial import FAESpatialEncoder, FAESpatialDecoder
3
4# Load checkpoint
5state = torch.load("training_state.pt", map_location="cpu")
6feat_mean = state["feat_mean"].cuda()
7feat_std = state["feat_std"].cuda()
8
9encoder = FAESpatialEncoder(embed_dim=1152, latent_dim=32, num_heads=16, pool_factor=4, use_vae=True)
10encoder.load_state_dict(torch.load("fae_encoder.pt", map_location="cpu"))
11encoder = encoder.cuda().eval()
12
13decoder = FAESpatialDecoder(latent_dim=32, output_dim=1152, num_layers=6, num_heads=16, ffn_mult=2.7, pool_factor=4)
14decoder.load_state_dict(torch.load("feature_decoder.pt", map_location="cpu"))
15decoder = decoder.cuda().eval()
16
17# Compress ViT features [B, 576, 1152]
18vit_features_norm = (vit_features - feat_mean) / feat_std
19z, mu, logvar = encoder(vit_features_norm) # [B, 36, 32]
20reconstructed = decoder(z) # [B, 576, 1152]
21reconstructed = reconstructed * feat_std + feat_mean