Skip to content

feat: Halton low-discrepancy MaskGIT unmasking schedule#22

Open
tashapais wants to merge 1 commit into
AlmondGod:mainfrom
tashapais:feat/halton-maskgit
Open

feat: Halton low-discrepancy MaskGIT unmasking schedule#22
tashapais wants to merge 1 commit into
AlmondGod:mainfrom
tashapais:feat/halton-maskgit

Conversation

@tashapais
Copy link
Copy Markdown

Summary

Adds the Halton low-discrepancy sequence as a third MaskGIT unmasking schedule alongside the existing exponential schedule.

The Halton scheduler sorts the base-2 Halton sequence for num_steps steps and uses each sorted value as the cumulative unmasking fraction at that step. This distributes unmasking more uniformly across the confidence range compared to exponential or cosine schedules, avoiding over-commitment to the very first high-confidence tokens.

Enable with maskgit_schedule: "halton" in configs/training.yaml or configs/inference.yaml. Default remains "exp" so no existing runs are affected.

Changes

  • models/dynamics.py: _halton static helper, halton_schedule_torch method, schedule param on forward_inference
  • utils/config.py: maskgit_schedule field on DynamicsConfig, TrainingConfig, InferenceConfig
  • configs/training.yaml, configs/inference.yaml: new field with default
  • scripts/run_inference.py: pass maskgit_schedule to forward_inference

Test plan

  • halton_schedule_torch produces monotonically increasing values ending at P_total
  • forward_inference with schedule="halton" produces correct output shape
  • Qualitative comparison of generated frames vs exp schedule (requires GPU)

Implements the Halton sequence scheduler from the MaskGIT scheduler
TODO. The Halton schedule sorts the base-2 Halton sequence for T steps
and uses each sorted value as the cumulative unmasking fraction at that
step, giving more uniform coverage across the confidence range than
exponential or cosine schedules.

Enable with maskgit_schedule: "halton" in configs/training.yaml or
configs/inference.yaml. Default remains "exp" for backward compatibility.
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