ReasonXL-SFT / README.md
toroe's picture
Document quality assurance pipeline
321da71 verified
|
Raw
History Blame Contribute Delete
8.21 kB
metadata
configs:
  - config_name: default
    data_files:
      - split: english
        path: data/english-*
      - split: italian
        path: data/italian-*
      - split: german
        path: data/german-*
      - split: french
        path: data/french-*
      - split: spanish
        path: data/spanish-*
dataset_info:
  features:
    - name: messages
      list:
        - name: content
          dtype: string
        - name: role
          dtype: string
    - name: source
      dtype: string
    - name: dataset_name
      dtype: string
    - name: ds_uid
      dtype: int64
    - name: language
      dtype: string
    - name: row_index
      dtype: int64
  splits:
    - name: english
      num_bytes: 38062379774
      num_examples: 2538450
    - name: italian
      num_bytes: 30928229955
      num_examples: 2538450
    - name: german
      num_bytes: 31882959921
      num_examples: 2538450
    - name: french
      num_bytes: 33569899978
      num_examples: 2538450
    - name: spanish
      num_bytes: 32775272029
      num_examples: 2538450
  download_size: 76345944428
  dataset_size: 167218741657
license: apache-2.0
language:
  - en
  - de
  - fr
  - es
  - it

ReasonXL: A Multilingual Cross-Domain Reasoning Corpus

ReasonXL is a large-scale multilingual reasoning corpus spanning five languages, with 2,538,450 positionally aligned examples per language (12,692,250 rows total). It is designed to support supervised fine-tuning of reasoning models with in-language chain-of-thought traces across diverse technical domains.


Data Generation

English source samples were drawn from 10 existing reasoning datasets, filtered and quality-annotated using ellamind/propella-1-4b, and then translated into four European languages (German, French, Spanish, Italian) using Qwen3-32B served via vLLM.

Each sample consists of three independently translated components: the user input, the reasoning trace (within <think> tags), and the final output. Translation used nucleus sampling at low temperature (T=0.1, top-p=1.0) with a dedicated system prompt instructing the model to preserve technical terminology, mathematical notation, and reasoning structure.

English samples were annotated across 18 properties (safety, information density, educational value, audience, domain, etc.) and filtered through a multi-stage pipeline enforcing integrity constraints, domain-dependent quality thresholds, and class-aware downsampling for domain balance. Annotations transfer directly to all translations without re-annotation.


Translation Prompt

Each field (input, reasoning trace, output) was translated independently using the following prompt template:


SYSTEM: You are a professional translator specializing in technical and
educational content. Translate the following {field} text into {language}.
 
CRITICAL INSTRUCTIONS:
1. Output ONLY the translated text
2. Preserve ALL technical terms, code snippets, mathematical notation,
   and formatting exactly
3. Maintain the same tone, style, and formality
4. {language-specific formality guidance}
5. For code: Keep variable/function names in English
6. For math: Preserve LaTeX notation unchanged
7. Adapt examples and cultural references appropriately
8. Maintain terminology consistency throughout

USER: TEXT TO TRANSLATE:
{text}

Language-specific formality guidance: - German: Use formal German (Sie) for professional/technical content - Spanish: Use neutral Spanish suitable for international audiences - French: Use standard French with appropriate formality - Italian: Use standard Italian with professional tone

Quality Assurance

The corpus was processed with a reproducible, rule-based QA pipeline after the initial quality filtering. Measurement and policy were kept separate: audit flags were retained for traceability, while only explicit failure conditions triggered rejection.

Stage Checks and actions
Normalisation and structure Normalised content-free leading system turns, then validated message roles, non-empty content, balanced and ordered <think> tags, a non-empty final answer, code-fence parity, boxed-answer braces, and truncation markers.
Translation-leak repair Used a language-agnostic structural detector for leaked numbered translator-instruction blocks. A block was removed only when the remaining reasoning was substantive, the final answer remained non-empty, and tag balance was preserved; otherwise the row was rejected.
Language fidelity Removed code, LaTeX, markup, and URLs from the text used for language measurement, then applied fastText lid.176 at prompt, document, reasoning, final-answer, and paragraph-segment levels. A mismatch was rejected only when it could be attributed to translation failure; legitimate translation, grammar, and multilingual tasks were preserved.
Degeneration and encoding Checked for repetition loops, all-caps prose, untranslated segments, mojibake, Unicode replacement characters, and translated prompt or label leakage.
Semantic consistency Extracted canonical boxed, multiple-choice, or short numeric answers and compared non-English outputs with their English anchor when both sides had an extractable answer.
Parallel-corpus controls Required unique provenance keys, intersected the five surviving key sets, and performed deterministic whole-conversation deduplication on English. Every deduplication decision was applied to all five languages together, followed by an independent full lockstep verification.

Explicit rejection conditions covered invalid or truncated structure, malformed markup, unrecoverable pipeline leakage, severe degeneration, attributable wrong-language or untranslated content, and extractable final-answer mismatch. Unattributed language-ID mismatches remained observations rather than rejection triggers to avoid biasing the corpus against legitimate multilingual tasks.

At release time, the five-way intersection contained 2,797,825 keys. English-reference content deduplication removed 259,375 aligned groups, leaving 2,538,450 examples per language with zero duplicate join keys. The independent verifier checked all positions across all five splits, and every published Parquet shard was checked for schema, compression, row count, and cross-language key order.


Data Sources

Dataset Config Samples
Cascade-SFT-Stage-2 general / math 714,589
Dolci-Think-SFT-7B science 510,466
Cascade-SFT-Stage-1 general / code / math / science 689,603
Llama-Nemotron-PTD science 484,703
Nemotron-Science-v1 100,419
Nemotron-IF-Chat-v1 38,670
Total 2,538,450

Release Statistics

Language Split Examples Parquet shards Download size
English english 2,538,450 76 17.71 GB
German german 2,538,450 62 14.64 GB
French french 2,538,450 66 14.97 GB
Spanish spanish 2,538,450 64 14.76 GB
Italian italian 2,538,450 58 14.26 GB
Total 12,692,250 326 76.35 GB

This release combines both completed translation batches, retains only keys present in all five languages, and applies group-wise English-content deduplication so positional alignment is preserved.


Data Integrity

All five splits contain the same 2,538,450 logical examples in the same order. Alignment is keyed by dataset_name, ds_uid, source, and row_index. From the 2,797,825-key five-language intersection, 259,375 duplicate English-content groups were removed together across every language. The published schema matches the original release: messages, source, dataset_name, ds_uid, language, and row_index.


Citation

@misc{reasonxl2026,
  title        = {Reason{XL}: A Multilingual Cross-Domain Reasoning Corpus},
  author       = {Daniil Gurgurov and Tom Röhr},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/toroe/ReasonXL-SFT}}
}

Paper citation will be added upon publication.