Views
No views yet
gpt2data_name=icot)teacher_only=Truec_attn, c_proj, and c_fcpytorch_model.bin2ff73124230aef272da686e78c0239c8d9228c425391a16e34302130d6565e3cCODI.state_dict. It
contains the GPT-2 base weights and the unmerged LoRA weights. This is not an
adapter-only checkpoint and is not a standalone Transformers checkpoint, so do
not load this repository with
AutoModelForCausalLM.from_pretrained("hanseungwook/gpt2-gsm8k-teacher-only").
Reconstruct the CoDi wrapper around gpt2 and then load this state dict, as the
project code does.1git clone https://github.com/hanseungwook/codi.git
2cd codi
3pip install -r requirements.txt
4
5python - <<'PY'
6from huggingface_hub import snapshot_download
7
8snapshot_download(
9 repo_id="hanseungwook/gpt2-gsm8k-teacher-only",
10 local_dir="checkpoints/gpt2-gsm8k-teacher-only",
11)
12PY
13
14export TEACHER_CKPT="$PWD/checkpoints/gpt2-gsm8k-teacher-only"TEACHER_CKPT may point either to this downloaded directory or directly to its
pytorch_model.bin file.1TEACHER_CKPT="$TEACHER_CKPT" \
2 bash scripts/train_gpt2_state_ae_gsm8k-aug.sh1python train_state_ae.py \
2 --model_name_or_path gpt2 \
3 --teacher_ckpt "$TEACHER_CKPT" \
4 --teacher_use_lora True \
5 --teacher_lora_r 128 \
6 --teacher_lora_alpha 32 \
7 --teacher_layer -1 \
8 --data_name YOUR_DATASET_NAME \
9 --output_dir outputs/state_ae_YOUR_DATASET \
10 --num_slots 6 \
11 --bf16 Truesrc.teacher_states.FrozenTeacher. It accepts either a
checkpoint directory or a weight-file path and reports the number of missing
and unexpected keys after loading. Both counts should be zero.state_ae.pt to the trajectory-supervised student:1AE_CKPT=outputs/state_ae_YOUR_DATASET/state_ae.pt \
2 ARM=ae \
3 bash scripts/train_gpt2_loop_trajectory_gsm8k-aug.sh--traj_teacher_ckpt (the ARM=steps and ARM=random
launchers do this through TEACHER_CKPT).src.teacher_states.FrozenTeacher:gpt2,
teacher_only=True, use_lora=True, use_prj=False, and num_latent=0.LoraConfig with rank 128, alpha 32, and target modules
c_attn, c_proj, and c_fc.pytorch_model.bin into the wrapper and require zero missing and zero
unexpected keys.training_args.bin, and trainer_state.json are included
unchanged alongside the final weights for provenance.