pack3d / README.md
amilworks's picture
Publish the PACK3D repacking demo
3cc67c8 verified
|
Raw History Blame Contribute Delete
3.73 kB
metadata
title: PACK3D — Repacking Demo
emoji: 🧊
colorFrom: purple
colorTo: indigo
sdk: static
app_file: index.html
fullWidth: true
pinned: true
license: mit
short_description: Same volume, new memory order. A 3D attention demo.
thumbnail: https://amilworks.github.io/Pack3D/social.png
tags:
  - 3d
  - attention
  - computer-vision
  - image-segmentation
  - microscopy
  - visualization
  - arxiv:2610.38694

PACK3D: the repacking demo

Interactive companion to Geometry Matters in Packed 3D Attention (NeurIPS 2026), by Amil Khan, Anantajit Subrahmanya, and B.S. Manjunath, University of California, Santa Barbara.

Paper: https://arxiv.org/abs/2610.38694

Project website · GitHub code · Run the CPU test

What to try

Repack the memory, then restore the training layout. Drag either cell, swipe sideways, or focus the 3D view and use the arrow keys to turn both. Pause motion for a still view. The demo respects reduced motion preferences and falls back from WebGL to Canvas 2D or text when needed.

PACK3D reads position from grid coordinates. The matched packed-RoPE control reads it from the sequence index. A pure repack carries each token's coordinate, neighborhood, summary memberships, and within-block slot along with it; it changes storage order while preserving the operator's geometric structure.

What the visualization represents

This is an illustration of measured results, not live model inference. The cell and the locations of changed predictions are procedural illustrations. Counts are the mean changed-prediction rates across six seeds, scaled to a crop of 262,144 positions: approximately 18 for PACK3D (0.0069%) and 3,215 for packed RoPE (1.23%). The strips illustrate sixteen memory groups moved whole. They do not display an actual validation crop or the full experimental grouping.

Model Training-layout Dice Pure-repack Dice
PACK3D 0.8247 0.8248
Packed RoPE 0.8229 0.7750

Allen-15 mean validation macro Dice, six matched seeds, 120 validation crops, unchanged checkpoints and no retraining. Values come from the released camera-ready results: per-seed measurements.

The CPU example performs real forward passes on a randomly initialized layer and compares aligned outputs. It is separate from the trained-model evaluation above.

Run locally and maintain

This is a static HTML/CSS/JavaScript Space. It needs no Python service, model download, account, or paid GPU. All runtime assets are included locally.

From the Pack3D repository root:

python3 tools/build_hf_space.py
python3 tools/build_hf_space.py --check
python3 -m http.server 8766 --directory spaces/repacking-demo

The exporter reuses the website's repacking renderer, data, design tokens, fonts, and logos. Edit website/app.js for renderer changes and regenerate; edit this folder's index.html and style.css for the standalone presentation. Upload this folder's contents to the static Space root.

Citation

@inproceedings{khan2026geometry,
  title={Geometry Matters in Packed {3D} Attention},
  author={Khan, Amil and Subrahmanya, Anantajit and Manjunath, B. S.},
  booktitle={Advances in Neural Information Processing Systems},
  year={2026},
  eprint={2610.38694},
  archivePrefix={arXiv}
}

Code and demo: MIT. Inter and DM Mono: SIL Open Font License, included alongside the fonts.