File size: 2,738 Bytes
1e59964
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# StepProbe: Default experiment configuration
# =============================================

project:
  name: "stepprobe"
  description: "Step-level diagnostic of quantization degradation in reasoning LLMs"
  seed: 42

# Models to evaluate
models:
  primary:
    - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
      tag: "r1-qwen-7b"
      precision: "fp16"
      vram_fp16_gb: 14
      
  quantized_variants:
    - base: "r1-qwen-7b"
      method: "awq"
      bits: [4, 3]
      group_size: 128
      
    - base: "r1-qwen-7b"
      method: "gptq"  
      bits: [4, 3, 2]
      group_size: 128
      
    - base: "r1-qwen-7b"
      method: "bnb_nf4"
      bits: [4]

  # Additional models (run after primary)
  extended:
    - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
      tag: "r1-qwen-1.5b"
    - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
      tag: "r1-qwen-14b"
      note: "4-bit only on 24GB"
    - name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
      tag: "r1-qwen-32b"
      note: "4-bit GGUF only on 24GB"
    - name: "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
      tag: "r1-llama-8b"
      note: "cross-architecture validation"

  # Non-reasoning control
  control:
    - name: "Qwen/Qwen2.5-7B-Instruct"
      tag: "qwen25-7b-instruct"
      note: "non-reasoning baseline for H4 hypothesis"

# Benchmarks
benchmarks:
  - name: "gsm8k"
    dataset: "openai/gsm8k"
    split: "test"
    n_samples: 1319  # full test set
    difficulty: "easy"
    
  - name: "math500"
    dataset: "HuggingFaceH4/MATH-500"
    split: "test"
    n_samples: 500
    difficulty: "medium-hard"
    
  - name: "gpqa_diamond"
    dataset: "Idavidrein/gpqa"
    subset: "gpqa_diamond"
    split: "train"
    n_samples: 198
    difficulty: "hard"

# Inference settings
inference:
  max_new_tokens: 4096
  temperature: 0.0  # greedy for reproducibility
  do_sample: false
  num_runs: 3  # for variance estimation

# Step segmentation
segmentation:
  method: "rule_based"  # or "llm_based"
  llm_judge: "gpt-4o"  # for LLM-based segmentation fallback

# Error diagnosis
diagnosis:
  judge_model: "gpt-4o"
  judge_temperature: 0.0
  n_judge_samples: 3  # majority vote
  error_types:
    - conceptual
    - methodological
    - executional
    - logical
  human_validation_size: 200

# Restoration
restoration:
  method: "qlora"  # or "dpo"
  qlora:
    r: 16
    lora_alpha: 32
    target_modules: ["q_proj", "v_proj", "k_proj", "o_proj"]
    learning_rate: 2.0e-4
    num_epochs: 3
    batch_size: 4
    gradient_accumulation_steps: 4
    max_samples: 500
  dpo:
    beta: 0.1
    learning_rate: 5.0e-5
    num_epochs: 1
    max_pairs: 300

# Output
output:
  base_dir: "results/"
  figures_dir: "figures/"
  paper_dir: "paper/"