This repository contains the E²C model weights trained on top of
Qwen3-8B.
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:
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.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "TingheOliver/Explore-Execute-Chain-Qwen",
5 subfolder="8B-Final",
6 torch_dtype="bfloat16",
7 device_map="auto",
8)
9tokenizer = AutoTokenizer.from_pretrained(
10 "TingheOliver/Explore-Execute-Chain-Qwen",
11 subfolder="8B-Final",
12)
13
14problem = "Find all positive integers n such that n² + 1 divides n³ + 1."
15
16messages = [{"role": "user", "content": problem}]
17prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
18
19inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
20output = model.generate(**inputs, max_new_tokens=4096, temperature=0.7, do_sample=True)
21response = tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=False)
22
23# Parse phases
24if "<EXPLORATION>" in response and "<EXECUTION>" in response:
25 exploration = response.split("<EXPLORATION>")[1].split("</EXPLORATION>")[0].strip()
26 execution = response.split("<EXECUTION>")[1].split("</EXECUTION>")[0].strip()
27 print("Plan:\n", exploration)
28 print("\nSolution:\n", execution)
29else:
30 print(response)
See the
GitHub repository for full evaluation scripts and test-time scaling experiments.
Exploration tokens receive λ-amplified gradient weight throughout RL training to focus the policy improvement signal on the planning phase.
1@misc{yang2025e2c,
2 title = {Explore-Execute Chain: Towards an Efficient Structured Reasoning Paradigm},
3 author = {Kaisen Yang and Tinghe Zhang and Rushi Shah and Kaicheng Yang and
4 Qinwei Ma and Dianbo Liu and Alex Lamb},
5 year = {2025},
6 eprint = {2509.23946},
7 archivePrefix = {arXiv},
8 primaryClass = {cs.LG},
9 url = {https://arxiv.org/abs/2509.23946}
10}