The paper
This model is part of the experiments of Spinning Straw into Gold: Small Amounts of Synthetic Derivations Improve Reasoning in Instruction-Tuned Models.
The paper is under review. A preprint link will be added here.
Synthetic data now supplies much of the instruction tuning of language models, and it is usually
written by another language model. The paper studies data at the opposite extreme: multi-hop deduction
problems and their solutions that a short program generates with no model in the loop. The problems
are ground Horn-clause deductions over abstract constants, so the documents are correct by construction
and contain no world knowledge. A small share of an instruction-tuning mixture is replaced with such
documents while the number of training examples stays fixed.
Main findings:
- On Qwen2.5-7B, replacing 5-25% of the mixture raises accuracy by 5 to 16 points on ProofWriter,
by up to 6 points on FOLIO and by up to 7 points on the multi-step subtasks of BIG-Bench Hard.
General benchmarks stay mostly unchanged.
- Replacing the same rows with procedural traces that contain no logic recovers much of the
ProofWriter and FOLIO gain. Reasoning on held-out generator problems and part of the BIG-Bench Hard
gain require the deduction data.
- With the English rendering, the ProofWriter gain holds on 5 models from 3 families between 3B and
14B parameters.
- 1% of the mixture suffices for the model to write long derivations that a symbolic checker accepts.
- The ProofWriter gain comes from two effects. The model learns to carry an intermediate conclusion
along a chain, and it stops preferring one answer label over the others.
Training data
Mixture Dolci100k-Formal05pct. 95k Dolci instruction examples plus 5k generated deduction problems whose answer is preceded by a step-by-step formal derivation (5% of the mixture replaced).
The mixture is config logic_p05 of the dataset
flaitenberger/SpinningStrawIntoGold-SFT-Mixtures. Instruction examples come from
allenai/Dolci-Instruct-SFT-No-Tools (single-turn conversations, sampled with seed 3407).
All mixtures share the same Dolci rows except the replaced slice.
The generated problems are ground Horn-clause deductions: a set of facts about constants
c0, c1, ... (colour, tree and direction words), if-then rules that chain across up to 25 layers,
distractor rules that never fire, and a question with four candidate answers. The target derives the
answer step by step, either in English or in a formal notation with declared constants and predicates
and numbered, justified lines. A symbolic checker verifies every derivation.
Training
Table with columns: Setting, Value| Setting | Value |
|---|
| Training | full-parameter supervised fine-tuning, one epoch |
| Examples | 100,000 single-turn chat examples |
| Learning rate | 5e-06, linear schedule, warmup ratio 0.03 |
| Global batch size | 128 |
| Max sequence length | 8192 (the run aborts if more than 0.5% of targets would be truncated) |
| Precision | bf16 mixed precision, FSDP full sharding with gradient checkpointing |
| Released weights | bf16 safetensors |
| Loss | assistant tokens only (prompt masked), Qwen2.5 chat template |
| Checkpoint | final checkpoint of the run |
The base model was extended to 8192 positions with YaRN rope scaling ({'factor': 2.0, 'original_max_position_embeddings': 4096, 'rope_type': 'yarn', 'type': 'yarn'}) before fine-tuning. The config keeps this setting.
Training code: scripts/train_instruction_sft.py of the synthetic-RLVL code base (Hugging Face
Trainer with FSDP). The file provenance.json records the source run, the training arguments and the
evaluation files of this model.
Results
Table with columns: Benchmark, This model, Baseline (same run), Difference| Benchmark | This model | Baseline (same run) | Difference |
|---|
| ARC-Challenge | 43.9 | 43.9 | +0.0 |
| GSM8K | 83.6 | 83.6 | +0.0 |
| MMLU | 57.7 | 57.8 | -0.1 |
| HellaSwag | 61.4 | 61.4 | +0.0 |
| LogiQA (AGIEval) | 29.6 | 29.5 | +0.2 |
| BBH | 67.6 | 67.8 | -0.2 |
| HumanEval | 37.8 | 37.2 | +0.6 |
| MBPP | 58.6 | 57.8 | +0.8 |
| BoolQ | 76.0 | 75.9 | +0.1 |
| IFEval (strict) | 39.4 | 38.1 | +1.3 |
| RACE | 37.9 | 38.1 | -0.2 |
| SciQ | 93.9 | 94.2 | -0.3 |
| TruthfulQA-MC2 | 47.6 | 46.9 | +0.7 |
| FOLIO | 47.8 | 45.3 | +2.5 |
| GPQA-Diamond | 38.9 | 40.4 | -1.5 |
| ProofWriter depth 0, chain-of-thought | 55.2 | 57.4 | -2.2 |
| ProofWriter depth 1, chain-of-thought | 33.8 | 43.2 | -9.4 |
| ProofWriter depth 2, chain-of-thought | 39.2 | 45.8 | -6.6 |
| ProofWriter depth 3, chain-of-thought | 40.0 | 46.4 | -6.4 |
| ProofWriter depth 5, chain-of-thought | 40.8 | 42.8 | -2.0 |
| ProofWriter depth 0, direct answer | 52.8 | 51.2 | +1.6 |
| ProofWriter depth 1, direct answer | 41.4 | 41.6 | -0.2 |
| ProofWriter depth 2, direct answer | 56.6 | 54.8 | +1.8 |
| ProofWriter depth 3, direct answer | 62.0 | 58.4 | +3.6 |
| ProofWriter depth 5, direct answer | 62.8 | 59.4 | +3.4 |
Scores are accuracy, exact match or pass@1 in percent from lm-evaluation-harness. The full result files with task definitions are in eval/ (suites: bbh_nochat, capability, code_nochat, cot, deduction, dissimilar, drop, folio_gpqa, mc, ppl_nochat, similar, standard). Differences of one to two points between two single models are within the spread across runs. The paper reports means over runs.
Usage
The model was trained with the Qwen2.5 chat template (including its default system prompt) and ends
each answer with <|im_end|> (token id 151645). The config, generation config and tokenizer of this
release set it as the end-of-sequence token, so generation stops there without extra arguments.
from transformers import AutoModelForCausalLM, AutoTokenizer repo = "flaitenberger/SpinningStrawIntoGold-Qwen2.5-Math-7B-Dolci100k-Formal05pct"tok = AutoTokenizer.from_pretrained(repo)model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16", device_map="auto") messages = [{"role": "user", "content": "All birds can fly. Tweety is a bird. Can Tweety fly? Explain."}]inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)out = model.generate(inputs, max_new_tokens=1024, do_sample=False)print(tok.decode(out[0, inputs.shape[1]:], skip_special_tokens=True))
With vLLM:
from vllm import LLM, SamplingParamsllm = LLM("flaitenberger/SpinningStrawIntoGold-Qwen2.5-Math-7B-Dolci100k-Formal05pct", dtype="bfloat16", max_model_len=8192)print(llm.chat([{"role": "user", "content": "..."}], SamplingParams(temperature=0, max_tokens=1024))[0].outputs[0].text)
Limitations
This is a research model trained for controlled comparisons, with one epoch of supervised
fine-tuning and no preference tuning or safety alignment beyond what the instruction data contains.
It is not intended for deployment.
License
Apache-2.0, following the base model. The instruction data (allenai/Dolci-Instruct-SFT-No-Tools) is released under ODC-BY.
Citation
A citation entry will be added with the preprint. Until then, please link to this repository.