Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
problem_id: string
model: string
quant: string
step_index: int64
step_text: string
rule_based: string
judge_label: string
judge: string
cohen_kappa: double
confusion_matrix_rule_rows_judge_cols: list<item: list<item: int64>>
  child 0, item: list<item: int64>
      child 0, item: int64
categories: list<item: string>
  child 0, item: string
n_samples: int64
distribution_rule_based: struct<conceptual: int64, executional: int64, logical: int64>
  child 0, conceptual: int64
  child 1, executional: int64
  child 2, logical: int64
distribution_judge: struct<logical: int64, conceptual: int64, executional: int64, methodological: int64>
  child 0, logical: int64
  child 1, conceptual: int64
  child 2, executional: int64
  child 3, methodological: int64
to
{'n_samples': Value('int64'), 'judge': Value('string'), 'cohen_kappa': Value('float64'), 'categories': List(Value('string')), 'confusion_matrix_rule_rows_judge_cols': List(List(Value('int64'))), 'distribution_rule_based': {'conceptual': Value('int64'), 'executional': Value('int64'), 'logical': Value('int64')}, 'distribution_judge': {'logical': Value('int64'), 'conceptual': Value('int64'), 'executional': Value('int64'), 'methodological': Value('int64')}}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              problem_id: string
              model: string
              quant: string
              step_index: int64
              step_text: string
              rule_based: string
              judge_label: string
              judge: string
              cohen_kappa: double
              confusion_matrix_rule_rows_judge_cols: list<item: list<item: int64>>
                child 0, item: list<item: int64>
                    child 0, item: int64
              categories: list<item: string>
                child 0, item: string
              n_samples: int64
              distribution_rule_based: struct<conceptual: int64, executional: int64, logical: int64>
                child 0, conceptual: int64
                child 1, executional: int64
                child 2, logical: int64
              distribution_judge: struct<logical: int64, conceptual: int64, executional: int64, methodological: int64>
                child 0, logical: int64
                child 1, conceptual: int64
                child 2, executional: int64
                child 3, methodological: int64
              to
              {'n_samples': Value('int64'), 'judge': Value('string'), 'cohen_kappa': Value('float64'), 'categories': List(Value('string')), 'confusion_matrix_rule_rows_judge_cols': List(List(Value('int64'))), 'distribution_rule_based': {'conceptual': Value('int64'), 'executional': Value('int64'), 'logical': Value('int64')}, 'distribution_judge': {'logical': Value('int64'), 'conceptual': Value('int64'), 'executional': Value('int64'), 'methodological': Value('int64')}}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

StepProbe πŸ”¬

Step-Level Diagnosis of Reasoning under Weight Quantization, with Diagnosis-Driven Interventions

Where exactly does reasoning break when you quantize a thinking model?

This repository hosts the code, paper, and released experiment artefacts for the manuscript:

StepProbe: Step-Level Diagnosis of Reasoning under Weight Quantization, with Diagnosis-Driven Interventions Tran Huy Hoang Son. Submitted to Neurocomputing, 2026.

The full PDF lives at paper/main.pdf; the LaTeX source, the highlights file, and the two appendices (LLM-judge prompts and qualitative error-type examples) are under paper/.

What StepProbe does

StepProbe is a diagnostic-plus-intervention framework that answers three questions about quantized reasoning LLMs:

  1. Where in the chain-of-thought does reasoning first fail?
  2. What type of error dominates at each bit-width?
  3. Can we fix it with minimal, diagnosis-driven intervention?

The framework introduces three step-level metrics:

Metric Meaning
FFS β€” First Failure Step Step index where the quantized chain first diverges
ECR β€” Error Cascade Rate Fraction of post-FFS steps that are also incorrect
SSR β€” Step Survival Rate Probability that the chain is still correct at depth d

…plus a 4-way error-type taxonomy (conceptual / methodological / executional / logical), and two downstream interventions (targeted QLoRA fine-tuning; training-free FP16 prompt-prefix injection).

Headline findings (paper Β§5)

  • >85% of failed traces fail in the first three reasoning steps β€” damage is concentrated at the chain's opening, not distributed evenly.
  • Conditional cascade rate >0.90 on the harder benchmarks (MATH-500, GPQA-Diamond): once a quantized chain breaks, it almost never recovers.
  • Methodological errors dominate, not conceptual: under GPT-4o-mini re-classification, methodological accounts for 54–60% of failed steps; conceptual is only ~9%.
  • Targeted QLoRA recovers up to +7.6 pp on Qwen-family cells; the diagnosed-vs-random selection gap is +1.8 pp (significant; honestly reported as small relative to the overall recovery).
  • Training-free prompt-prefix injection adds +7.6 pp at k=4 under a leak-controlled ablation, matching the QLoRA comparator at k=2.

Repository layout

StepProbe/
β”œβ”€β”€ paper/              # LaTeX manuscript + highlights + form
β”‚   β”œβ”€β”€ main.tex        # Source (elsarticle, Neurocomputing target)
β”‚   β”œβ”€β”€ main.pdf        # Compiled paper (44 pp)
β”‚   β”œβ”€β”€ highlights.txt  # Editorial-Manager highlights file (5 bullets)
β”‚   └── references.bib  # 38 references
β”œβ”€β”€ stepprobe/          # Core package
β”‚   β”œβ”€β”€ segment.py      # CoT step segmentation (rule-based)
β”‚   β”œβ”€β”€ align.py        # DTW step alignment
β”‚   β”œβ”€β”€ diagnose.py     # Per-step scoring + LLM-judge prompts
β”‚   β”œβ”€β”€ metrics.py      # FFS / ECR / SSR computation
β”‚   └── restore.py      # QLoRA targeted fine-tuning
β”œβ”€β”€ scripts/            # Top-level runners and figure generators
β”‚   β”œβ”€β”€ run_inference.py
β”‚   β”œβ”€β”€ run_eval.py
β”‚   β”œβ”€β”€ compute_ci.py           # Bootstrap CIs + paired sig tests
β”‚   β”œβ”€β”€ eval_accuracy.py
β”‚   β”œβ”€β”€ make_paper_figures.py   # Figs 1, 2, 3, 4, 5, 11–13 + Table 4
β”‚   β”œβ”€β”€ make_ablation_figure.py # Fig 9
β”‚   β”œβ”€β”€ make_baselines_figure.py# Fig 10
β”‚   β”œβ”€β”€ make_lr_sweep_figure.py # Fig 12
β”‚   β”œβ”€β”€ make_multi_seed_figure.py# Fig 13
β”‚   β”œβ”€β”€ make_prefix_injection_figure.py # Fig 14
β”‚   β”œβ”€β”€ rediagnose_error_types.py
β”‚   └── validate_classifier.py
β”œβ”€β”€ run_*.sh            # Experiment launchers (one per ablation)
β”œβ”€β”€ configs/default.yaml
β”œβ”€β”€ requirements.txt
└── figures/paper/      # Final figure PDFs referenced by main.tex

Reproducing the paper

The released results/ and logs/ directories are not in this repository (too large for git). To reproduce from scratch you need a single 24-GB GPU and roughly 24 hours of compute.

# 0. Install dependencies
pip install -r requirements.txt

# 1. Main matrix (Table 4): 4 models Γ— 3 benchmarks Γ— 6 conditions
bash run_all.sh

# 2. Ablation: silver-bullet dataset size N (Table 5)
bash run_ablation.sh

# 3. Sampling-strategy baselines (Table 6)
bash run_baselines.sh

# 4. Llama LR sweep (Fig 12)
bash run_llama_lr_sweep.sh

# 5. Multi-seed robustness (Fig 13)
bash run_multi_seed.sh

# 6. Prompt-prefix injection (Fig 14, Table 7)
bash run_prompt_prefix.sh

# 7. Render all paper figures + tables from results/metrics/
python scripts/make_paper_figures.py --metrics results/metrics \
    --output figures/paper --primary-model r1-qwen-7b \
    --primary-benchmark math500

The full paper PDF rebuilds with:

cd paper && tectonic main.tex      # or: latexmk -pdf main.tex

Quick demo (no GPU required)

For a 20-problem dry run on a small model:

python scripts/run_eval.py \
    --model deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B \
    --benchmark gsm8k --quant-methods bnb_nf4 --quick

Models, benchmarks, quantization

Models tested in the paper (24-GB-VRAM-friendly in 4-bit):

  • DeepSeek-R1-Distill-Qwen-{1.5B, 7B, 14B}
  • DeepSeek-R1-Distill-Llama-8B
  • Qwen2.5-7B-Instruct (non-reasoning control / primary intervention cell)

Quantization methods: AWQ, GPTQ, BitsAndBytes NF4 (SmoothQuant supported but not part of the main matrix.)

Benchmarks: GSM8K, MATH-500, GPQA-Diamond.

Hardware

All experiments ran on a single NVIDIA RTX 3090 Ti (24 GB).

Citing

If you use StepProbe, please cite the paper:

@article{son2026stepprobe,
  title  = {StepProbe: Step-Level Diagnosis of Reasoning under Weight
            Quantization, with Diagnosis-Driven Interventions},
  author = {Tran Huy Hoang Son},
  journal= {Neurocomputing},
  year   = {2026},
  note   = {Under review}
}

License

MIT β€” see LICENSE.

Downloads last month
5