GOVINDFROM's picture
Fixes: NCM same-data training artifacts and curves
ce41242 verified
|
Raw History Blame Contribute Delete
3.3 kB

NCM on the project's training split

train_same_data.py trains the official NCM modules in two stages: a randomly initialized multiscale VQ-VAE on training solutions, followed by a randomly initialized conditional generator with the codec frozen. No published weights are loaded. Both stages use paired digit relabeling; only the generator consumes puzzle prefixes. All 100,000 training puzzles are eligible for sampling.

The upstream inference release has no training entry point. This is our training loop around those modules, not a reproduction of the authors' trainer. The architecture configuration and upstream commit are archived with each run.

Budget and interpretation

This single-seed experiment is limited to a $10 Lambda rental. The nominal targets are 10,000 tokenizer updates and 50,000 generator updates, batch 256 rather than the paper's 1,024. The tokenizer is limited to 30 minutes so that the generator also receives training time. A fixed absolute training deadline reserves time for evaluation, graphs, and artifact collection before termination. The manifest records actual updates, examples seen, parameter counts, timing, training-array SHA-256 hashes, and whether a stage stopped early.

A budget-limited or poorly reconstructed tokenizer can constrain generator accuracy. Low accuracy must not be presented as a failure of the published NCM method. Training compute is not matched to the recurrent baseline. This run removes the different-training-split confound, not every experimental difference.

The official dropout and quantization modules are used. Gradient accumulation splits a batch into microbatches; codebook EMA decay is adjusted so the effective per-optimizer-update decay remains 0.99. Nested dropout is sampled per microbatch. Learning-rate schedules retain the nominal update counts if time expires early.

Checks and outputs

--smoke runs two updates per stage using training arrays only. It checks finite losses, gradient flow to the learned first-level query, independence of the first-level logits from future solution codes, and end-to-end generation shapes.

Normal training opens test arrays only after the final generator checkpoint. It reports exact board accuracy, legal-board rate, clue preservation, malformed separator rate, and per-puzzle predictions. There is no test-based checkpoint selection. Training reconstruction diagnostics are labeled as training data.

Artifacts include final weights, optimizer/RNG checkpoints, CSV training curves, training_curves.png, configuration, source, manifest, predictions, and results. The requested public destination is GOVINDFROM/parallel-consistent-masked-diffusion/Fixes/ncm-same-data-s0/. Account credentials remain on the local machine; local synchronization uploads only the artifact directory. The instance is protected by a local termination watchdog with sleep prevention; a remote shutdown timer provides a secondary workload stop. Instance termination, not OS shutdown, ends cloud billing.

Example (set the absolute epoch deadline for the rental before executing):

python ncm/train_same_data.py --upstream /path/to/HazyResearch-ncm \
  --data data/sudoku_hard --out runs/ncm-same-data-s0 \
  --batch 256 --micro-batch 64 --train-until "$TRAIN_UNTIL"