mathcompose / configs /verifier_v_7b.yaml
42e's picture
Upload folder using huggingface_hub
1c0986b verified
Raw
History Blame Contribute Delete
1.79 kB
# Model V on the 7B-Math base — tuned to USE the 80GB A100 (fast).
# Run with --gpu-preset none so these settings apply (not the 1.5B preset), and
# --push so the adapter lands on the Hub (Colab storage is ephemeral):
# python -m mathcompose.train.train --task v --config configs/verifier_v_7b.yaml \
# --gpu-preset none --push --hub-model-id <you>/mathcompose-verifier-7b
extends: "base.yaml"
task: "v"
output_dir: "runs/verifier_v_7b"
hub_model_id: null # set via --hub-model-id, e.g. "42e/mathcompose-verifier-7b"
model:
base_id: "Qwen/Qwen2.5-Math-7B-Instruct"
max_context: 4096
# For the FAST path (packing), install flash-attn and set:
# attn_implementation: flash_attention_2
attn_implementation: null
quant:
load_in_4bit: false # bf16 LoRA on the 80GB A100 (no dequant; uses the VRAM)
data:
train_path: "data/verifier/train.jsonl" # v2 genuine-detection data
val_path: "data/verifier/val.jsonl"
train:
max_length: 2560 # measured: V data maxes at 2334 tokens (p99 1715)
per_device_train_batch_size: 2 # no-checkpoint -> a long batch caps the size; 2 is safe (~47GB)
gradient_accumulation_steps: 8 # eff batch 16
gradient_checkpointing: false # 80GB + short data -> skip the recompute tax (was the >3hr cause)
optim: adamw_torch_fused
packing: false
# ~1.5 hr at these settings. FASTEST (~30-45 min) = packing, which needs FlashAttention-2:
# pip install flash-attn --no-build-isolation
# then set model.attn_implementation: flash_attention_2 AND train.packing: true.
# To push batch without packing: try --batch-size 3 (may OOM on a long batch) or --precision 4bit.
eval:
processbench_splits: ["gsm8k", "math", "olympiadbench", "omnimath"]
maj_k: 8
gpt4o_reference_f1: 61.9