TingheOliver commited on
Commit
48ea230
·
verified ·
1 Parent(s): 8e6d3d0

Add model card

Browse files
Files changed (1) hide show
  1. README.md +117 -0
README.md CHANGED
@@ -1,3 +1,120 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - Qwen/Qwen3-8B
7
+ tags:
8
+ - reasoning
9
+ - math
10
+ - chain-of-thought
11
+ - reinforcement-learning
12
+ arxiv: 2509.23946
13
  ---
14
+
15
+ # Explore-Execute Chain (E²C) — Qwen3-8B
16
+
17
+ This repository contains the E²C model weights trained on top of [Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B).
18
+
19
+ **Paper**: [Explore-Execute Chain: Towards an Efficient Structured Reasoning Paradigm](https://arxiv.org/abs/2509.23946)
20
+ **Code**: [GitHub](https://github.com/TingheOliver/Explore-Execute-Chain)
21
+
22
+ ## What is E²C?
23
+
24
+ Standard chain-of-thought mixes high-level planning and low-level derivation in a single undifferentiated sequence. E²C splits reasoning into two explicit phases inside one model:
25
+
26
+ - **Exploration** (`<EXPLORATION>...</EXPLORATION>`): a short, stochastic plan that outlines the solution strategy (~500 tokens).
27
+ - **Execution** (`<EXECUTION>...</EXECUTION>`): a deterministic, step-by-step derivation that follows the plan exactly.
28
+
29
+ The two phases are trained jointly. A causal SFT stage teaches the model the E²C format; a two-stage GRPO stage then amplifies the gradient weight on exploration tokens (λ > 1) to sharpen planning while keeping execution deterministic.
30
+
31
+ ## Model variants
32
+
33
+ | Name | Base | Training |
34
+ |------|------|----------|
35
+ | `8B-Final` | Qwen3-8B | E²C-SFT → E²C-RL (Stage 1 + Stage 2) |
36
+ | `4B-Final` | Qwen3-4B | E²C-SFT → E²C-RL (Stage 1 + Stage 2) |
37
+
38
+ ## Performance
39
+
40
+ **Mathematical reasoning** (Pass@1, 8 samples, Qwen3-8B base):
41
+
42
+ | Benchmark | Qwen3-8B + GRPO | E²C (SFT+RL) |
43
+ |-----------|----------------|--------------|
44
+ | AIME 2024 | 36.9% | **40.6%** |
45
+ | AIME 2025 | 34.4% | **33.8%** |
46
+ | MATH500 | 88.2% | **87.7%** |
47
+ | AMC 2023 | 79.3% | **80.3%** |
48
+
49
+ **Test-time scaling on AIME 2024** (K=32):
50
+
51
+ | Method | Accuracy | Tokens (k) |
52
+ |--------|----------|-----------|
53
+ | Self-Consistency | 50.0% | 86.2 |
54
+ | Tree-of-Thoughts | 50.0% | 71.3 |
55
+ | E²C-ReAct Loop | **53.3%** | **12.4** |
56
+
57
+ E²C-ReAct Loop reaches higher accuracy than standard TTS methods while using **7× fewer tokens**, by running the search over short exploration plans rather than full chains.
58
+
59
+ ## Usage
60
+
61
+ ```python
62
+ from transformers import AutoModelForCausalLM, AutoTokenizer
63
+
64
+ model = AutoModelForCausalLM.from_pretrained(
65
+ "TingheOliver/Explore-Execute-Chain-Qwen",
66
+ subfolder="8B-Final",
67
+ torch_dtype="bfloat16",
68
+ device_map="auto",
69
+ )
70
+ tokenizer = AutoTokenizer.from_pretrained(
71
+ "TingheOliver/Explore-Execute-Chain-Qwen",
72
+ subfolder="8B-Final",
73
+ )
74
+
75
+ problem = "Find all positive integers n such that n² + 1 divides n³ + 1."
76
+
77
+ messages = [{"role": "user", "content": problem}]
78
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
79
+
80
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
81
+ output = model.generate(**inputs, max_new_tokens=4096, temperature=0.7, do_sample=True)
82
+ response = tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=False)
83
+
84
+ # Parse phases
85
+ if "<EXPLORATION>" in response and "<EXECUTION>" in response:
86
+ exploration = response.split("<EXPLORATION>")[1].split("</EXPLORATION>")[0].strip()
87
+ execution = response.split("<EXECUTION>")[1].split("</EXECUTION>")[0].strip()
88
+ print("Plan:\n", exploration)
89
+ print("\nSolution:\n", execution)
90
+ else:
91
+ print(response)
92
+ ```
93
+
94
+ See the [GitHub repository](https://github.com/TingheOliver/Explore-Execute-Chain) for full evaluation scripts and test-time scaling experiments.
95
+
96
+ ## Training details
97
+
98
+ | Stage | Description |
99
+ |-------|-------------|
100
+ | Causal SFT data | Full solutions distilled into (exploration, execution) pairs; execution conditioned on exploration |
101
+ | E²C-SFT | Standard cross-entropy on structured output (prompt tokens masked) |
102
+ | E²C-RL Stage 1 | GRPO, rollout=32, temp=1.3, 1 epoch — diversifies exploration |
103
+ | E²C-RL Stage 2 | GRPO, rollout=8, temp=1.0, adv_coeff=2.0, 2 epochs — sharpens execution determinism |
104
+
105
+ Exploration tokens receive λ-amplified gradient weight throughout RL training to focus the policy improvement signal on the planning phase.
106
+
107
+ ## Citation
108
+
109
+ ```bibtex
110
+ @misc{yang2025e2c,
111
+ title = {Explore-Execute Chain: Towards an Efficient Structured Reasoning Paradigm},
112
+ author = {Kaisen Yang and Tinghe Zhang and Rushi Shah and Kaicheng Yang and
113
+ Qinwei Ma and Dianbo Liu and Alex Lamb},
114
+ year = {2025},
115
+ eprint = {2509.23946},
116
+ archivePrefix = {arXiv},
117
+ primaryClass = {cs.LG},
118
+ url = {https://arxiv.org/abs/2509.23946}
119
+ }
120
+ ```