n8t-stage2 / README.md
tturing's picture
Add files using upload-large-folder tool
b3c69ac verified
|
Raw History Blame Contribute Delete
2.07 kB

n8t-stage2: the stage-2 (context extension, 8k -> 64k) corpus of the BQA / FlashMatch campaign

Packed by scripts/campaign/n8t_stage2.py pack (see its docstring for the layout). To use it on a cluster that already holds the unpacked n8t-data root (BQA_DATA_ROOT):

hf download tturing/n8t-stage2 --repo-type dataset --local-dir /path/n8t-stage2
python scripts/campaign/n8t_stage2.py unpack --root $BQA_DATA_ROOT --pack /path/n8t-stage2 --hash

which joins the train parts into $BQA_DATA_ROOT/prolong_64k_llama2/prolong64k_train.bin next to the small files and verifies every sha256. Then scripts/campaign/stage2_arm.sh <arm> [seed] (through scripts/ifm/submit_stage2.sh on the preemptible cluster) trains the arm's stage-2 run on it.

Contents (Llama-2 32k tokenizer ids, uint16, BOS = 1 / EOS = 2):

  • prolong_64k_llama2/prolong64k_train.bin: the ProLong-64K corpus re-tokenized and re-packed into 65,536-token chunks (documents reconstructed, then packed; 566,949 chunks, 37.16 B tokens, 74.3 GB); stage 2 reads chunk_subset [0, 0.15] (85,042 chunks = 5.57 B tokens, enough for the 5,000 steps x 1 M tokens of the recipe with no repetition).
  • prolong_64k_llama2/prolong64k_train.doc_lengths.npy: int64 chunk lengths (all 65,536), sums to the token count.
  • prolong_64k_llama2/prolong64k_val.bin (+ doc_lengths): 256 held-out 64k windows, the 64k val-CE protocol (scripts/campaign/eval_arm_64k.sh, 256 windows x 65,536 tokens); the 8k val CE uses n8t-data's Nemotron holdout.

The stage-2 recipe (doc/plan_stage2_64k.md): warm start from the arm family's Standard stage-1 export, 65,536 tokens, YaRN factor 8 (theta unchanged, mscale^2 temperature), global batch 16 x 64k = 1 M tokens per step, per-device batch 1, 5,000 steps, WSD with a 100-step re-warm and a 20 % linear decay, the learning rate from the screen (S2_LR). RULER at 64k needs n8t-data's ruler-500-llama2/ (it carries the 65536 length); the eval configs live in the repo.

MANIFEST.json carries bytes + sha256 of every packed file and of the joined train stream.