File size: 1,786 Bytes
07d2b7b
 
 
 
 
3ca9c7a
 
 
 
07d2b7b
3ca9c7a
 
 
 
1c0986b
 
 
3ca9c7a
07d2b7b
1c0986b
07d2b7b
3ca9c7a
07d2b7b
3ca9c7a
 
 
1c0986b
 
 
 
 
 
 
 
 
 
3ca9c7a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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