feat: joint text prefix with learned tokens #43

Merged
dsh merged 1 commit from feat/text-prefix into master 2026-12-01 19:02:17 +00:00
Member

Prepend learned text tokens to the image patch sequence and let the existing bidirectional RAT blocks mix them.

  • text_vocab_size/text_max_len: y becomes prompt ids, 0 is null
  • learned complex text embedding + modality vector; a text position table exists only for max_len > 1
  • text is prepended to image tokens; time rotor is image-only
  • RAT/Hyper position rotors apply only to image tokens via image_start
  • head/unpatchify select image tokens only
  • trainer maps MNIST labels to prompt ids 1..10 and uses token 0 for class dropout
  • trainer sample grid uses the prompt mapping when num_classes == 0

MNIST 4L RAT-32, 10k, one learned token: 100% prompted classifier accuracy at guidance 5 vs 96.9% for the channel plane. No pretrained text model yet.

Prepend learned text tokens to the image patch sequence and let the existing bidirectional RAT blocks mix them. - `text_vocab_size`/`text_max_len`: `y` becomes prompt ids, 0 is null - learned complex text embedding + modality vector; a text position table exists only for `max_len > 1` - text is prepended to image tokens; time rotor is image-only - RAT/Hyper position rotors apply only to image tokens via `image_start` - head/unpatchify select image tokens only - trainer maps MNIST labels to prompt ids 1..10 and uses token 0 for class dropout - trainer sample grid uses the prompt mapping when `num_classes == 0` MNIST 4L RAT-32, 10k, one learned token: 100% prompted classifier accuracy at guidance 5 vs 96.9% for the channel plane. No pretrained text model yet.
dsh merged commit 766a9d310d into master 2026-12-01 19:02:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ml-lab/wink!43
No description provided.