96kevinli29 commited on
Commit
021fb1c
·
verified ·
1 Parent(s): 7c9ba52

Redesign card: figure, key results, quick start

Browse files
Files changed (2) hide show
  1. README.md +52 -37
  2. assets/sft_effect_8b.png +3 -0
README.md CHANGED
@@ -30,67 +30,82 @@ configs:
30
  path: test.parquet
31
  ---
32
 
33
- # SFT-Math-Multilingual-56k: long chain-of-thought math traces in six languages
34
 
35
- **56,307 mathematics problems, each with a full chain-of-thought solution written in one of six languages** (English, Chinese, Spanish, French, Arabic, Russian). The problem and the whole reasoning trace share one language, so a model fine-tuned on this corpus learns to reason in the language of the problem instead of switching to English.
36
 
37
- This is the supervised fine-tuning corpus behind [`96kevinli29/Qwen3-8B-SFT-Math-Multilingual`](https://huggingface.co/96kevinli29/Qwen3-8B-SFT-Math-Multilingual) (Qwen3-8B, epoch 1) in the paper *What Does Post-Training Change in Multilingual Reasoning?* ([arXiv:2609.37104](https://arxiv.org/abs/2609.37104)). It was constructed separately from the 43,218-trace corpus used at 4B ([`96kevinli29/SFT-Math-Multilingual-43k`](https://huggingface.co/datasets/96kevinli29/SFT-Math-Multilingual-43k)), with the same pipeline.
38
 
39
- ## Contents
40
 
41
- | Language | train | test (held-out loss) |
42
- | :--- | ---: | ---: |
43
- | English (`en`) | 9,760 | 40 |
44
- | Chinese (`zh`) | 9,294 | 40 |
45
- | Spanish (`es`) | 9,451 | 40 |
46
- | French (`fr`) | 9,357 | 40 |
47
- | Arabic (`ar`) | 9,306 | 40 |
48
- | Russian (`ru`) | 9,139 | 40 |
49
- | **Total** | **56,307** | **240** |
50
 
51
- Every source problem appears in exactly one language.
52
 
53
- ## Schema
54
 
55
- | Field | Description |
 
 
 
 
 
 
 
 
56
  | :--- | :--- |
57
- | `messages` | chat list: `[{"role": "user", "content": <problem>}, {"role": "assistant", "content": "<think> … </think> <solution with \\boxed{answer}>"}]` |
58
- | `data_source` | `"openr1_math"` |
59
- | `category` | `"math_competition"` |
60
- | `language` | one of `en, zh, es, fr, ar, ru` |
 
 
 
 
61
 
62
  ```python
63
  from datasets import load_dataset
64
- ds = load_dataset("96kevinli29/SFT-Math-Multilingual-56k")
65
- print(ds["train"][0]["language"], ds["train"][0]["messages"][1]["content"][:300])
 
 
 
 
66
  ```
67
 
68
- ## How it was built
 
 
 
69
 
70
- 1. **Source.** English long chain-of-thought traces from [`open-r1/OpenR1-Math-220k`](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k).
71
- 2. **Assign.** Each trace is assigned one of the six languages in round-robin order by its index.
72
- 3. **Translate.** English-assigned traces are kept unchanged. The others are translated by a locally served Qwen3-14B, chunk by chunk: formulas, figures and display environments are detached before translation and reattached afterwards, and the `<think>` tags are preserved. (Translating a long trace in one pass makes the translator re-solve the problem instead of translating it.)
73
- 4. **Filter.** A trace is dropped if any chunk was truncated or the `\boxed` answer changed, and then by seven further gates: exactly one `<think>` and one `</think>`; a recoverable boxed answer; an even number of dollar signs; matched braces; a bounded translated-to-source length ratio; no repetition (zlib compresses the trace by more than 70%); and target-language fidelity (share of prose characters in the target script above 0.5 for Chinese, Arabic and Russian; share of English function words below 0.15 for Spanish and French).
74
 
75
- ## Quality audit
76
 
77
- An audit of 250 sampled traces per language from the 43K corpus. Coherence and target-language fidelity are independent judge scores on a five-point scale; the last column is the share of traces free of moderate or severe English residue. The English row is the untranslated source, the reference these scores are read against.
 
78
 
79
- | Language | Coherence | Target-language fidelity | Reaches the boxed answer | Math preserved | No major English residue |
80
  | :--- | :---: | :---: | :---: | :---: | :---: |
81
  | Chinese | 4.90 | 4.62 | 99.6% | 100.0% | 96.0% |
82
  | Spanish | 4.78 | 4.40 | 99.6% | 100.0% | 94.0% |
83
  | French | 4.81 | 4.32 | 99.6% | 100.0% | 95.6% |
84
  | Arabic | 4.47 | 3.54 | 99.6% | 99.6% | 84.0% |
85
  | Russian | 4.76 | 4.40 | 100.0% | 98.8% | 94.4% |
86
- | English (untranslated) | 4.88 | n/a | 100.0% | 100.0% | n/a |
 
 
 
 
87
 
88
  ## Limitations
89
 
90
- - **Machine translation.** Translated traces can contain a stray word in English or in another language (for example a discourse marker such as "Okay," at the start of the reasoning). Arabic is the weakest language in the audit.
91
- - **Answers are not verified.** The source traces were filtered structurally, not for answer correctness; the translation step only checks that the boxed answer is unchanged.
92
- - **What fine-tuning on it does.** In the paper, models fine-tuned on this corpus reason in the requested language almost always, but lose some accuracy and loop on about a fifth of non-English prompts until an RL stage removes the looping. See the model cards for numbers.
93
- - Mathematics only.
94
 
95
  ## Citation
96
 
@@ -103,7 +118,7 @@ An audit of 250 sampled traces per language from the 43K corpus. Coherence and t
103
  }
104
 
105
  @misc{sft-math-multilingual-56k-2026,
106
- title = {{SFT-Math-Multilingual-56k}: long chain-of-thought math traces in six languages},
107
  author = {Li, Hongyang and Li, Xiao and Wu, Caesar and Danoy, Gr{\'e}goire and Bouvry, Pascal and {Sea-Fill Community}},
108
  year = {2026},
109
  publisher = {Hugging Face},
@@ -112,6 +127,6 @@ An audit of 250 sampled traces per language from the 43K corpus. Coherence and t
112
  }
113
  ```
114
 
115
- **Credits.** Built and released by the authors of the paper together with the [Sea-Fill Community](https://huggingface.co/SeaFill2025), which maintains this release.
116
 
117
  Please also cite [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k), the source of the English traces.
 
30
  path: test.parquet
31
  ---
32
 
33
+ <div align="center">
34
 
35
+ # SFT-Math-Multilingual-56k
36
 
37
+ **Long chain-of-thought math solutions, each written end to end in one of six languages**
38
 
39
+ <a href="https://arxiv.org/abs/2609.37104"><img alt="arXiv: 2609.37104" src="https://img.shields.io/badge/arXiv-2609.37104-b31b1b"></a> <img alt="traces: 56,307" src="https://img.shields.io/badge/traces-56,307-eb6834"> <img alt="languages: 6" src="https://img.shields.io/badge/languages-6-2a78d6"> <img alt="license: Apache 2.0" src="https://img.shields.io/badge/license-Apache_2.0-1baf7a">
40
 
41
+ </div>
 
 
 
 
 
 
 
 
42
 
43
+ <img src="https://huggingface.co/datasets/96kevinli29/SFT-Math-Multilingual-56k/resolve/main/assets/sft_effect_8b.png" alt="Bar chart per language of the share of responses reasoning in the requested language, before and after fine-tuning: English 100% to 100%, Chinese 100% to 100%, Spanish 0% to 100%, French 0% to 99%, Arabic 0% to 100%, Russian 35% to 100%" width="100%">
44
 
45
+ <p align="center"><sub>Share of responses whose reasoning is in the requested language, Qwen3-8B before and after fine-tuning on this dataset</sub></p>
46
 
47
+ Released reasoning models often think in English whatever language the user writes in. This dataset is **multilingual supervision for the reasoning itself**: in every example the problem, the full `<think>` trace and the final solution share one language.
48
+
49
+ - **Teach a model to reason in the user's language.** Fine-tuning Qwen3-8B on it moves target-language reasoning from 26.9% to **99.7%** across Chinese, Spanish, French, Arabic and Russian.
50
+ - **Warm-start multilingual RL.** It is the SFT stage before RL on [DAPO-Math-Multilingual-6Lang](https://huggingface.co/datasets/96kevinli29/DAPO-Math-Multilingual-6Lang).
51
+ - **Study multilingual reasoning.** One source distribution, six languages, every problem in exactly one of them.
52
+
53
+ ## At a glance
54
+
55
+ | | |
56
  | :--- | :--- |
57
+ | Examples | **56,307** train · 240 test (held-out loss, 40 per language) |
58
+ | Languages | English 9,760 · Chinese 9,294 · Spanish 9,451 · French 9,357 · Arabic 9,306 · Russian 9,139 |
59
+ | Length | median 12,305 characters per solution, reasoning included |
60
+ | Source | [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k), translated by Qwen3-14B and filtered |
61
+ | Trained on it | [Qwen3-8B-SFT-Math-Multilingual](https://huggingface.co/96kevinli29/Qwen3-8B-SFT-Math-Multilingual) |
62
+ | Sibling | [SFT-Math-Multilingual-43k](https://huggingface.co/datasets/96kevinli29/SFT-Math-Multilingual-43k), the 43K set used at 4B |
63
+
64
+ ## Quick start
65
 
66
  ```python
67
  from datasets import load_dataset
68
+
69
+ ds = load_dataset("96kevinli29/SFT-Math-Multilingual-56k", split="train")
70
+ ex = ds[0]
71
+ print(ex["language"]) # one of en, zh, es, fr, ar, ru
72
+ print(ex["messages"][0]["content"]) # the problem
73
+ print(ex["messages"][1]["content"]) # <think> … </think> + solution ending in \boxed{…}
74
  ```
75
 
76
+ Fields: `messages` (user problem, assistant solution), `language`, `data_source`, `category`.
77
+
78
+ <details>
79
+ <summary><b>How it was built</b></summary>
80
 
81
+ 1. **Source.** English long chain-of-thought traces from [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k).
82
+ 2. **Assign.** Each trace gets one of the six languages in round-robin order, so every problem appears in exactly one language.
83
+ 3. **Translate.** English traces stay as they are. The rest are translated chunk by chunk by a locally served Qwen3-14B; formulas and figures are detached first and reattached afterwards, and `<think>` tags are kept.
84
+ 4. **Filter.** A trace is dropped if a chunk was truncated or the `\boxed` answer changed, then by seven gates: one `<think>` block, a recoverable boxed answer, balanced `$` and braces, a bounded length ratio, no repetition, and target-language fidelity.
85
 
86
+ </details>
87
 
88
+ <details>
89
+ <summary><b>Quality audit</b></summary>
90
 
91
+ | | Coherence (1–5) | Target-language fidelity (1–5) | Reaches the boxed answer | Math preserved | No major English residue |
92
  | :--- | :---: | :---: | :---: | :---: | :---: |
93
  | Chinese | 4.90 | 4.62 | 99.6% | 100.0% | 96.0% |
94
  | Spanish | 4.78 | 4.40 | 99.6% | 100.0% | 94.0% |
95
  | French | 4.81 | 4.32 | 99.6% | 100.0% | 95.6% |
96
  | Arabic | 4.47 | 3.54 | 99.6% | 99.6% | 84.0% |
97
  | Russian | 4.76 | 4.40 | 100.0% | 98.8% | 94.4% |
98
+ | English, untranslated | 4.88 | n/a | 100.0% | 100.0% | n/a |
99
+
100
+ 250 sampled traces per language from the 43K corpus, scored by an independent judge.
101
+
102
+ </details>
103
 
104
  ## Limitations
105
 
106
+ - **Machine-translated.** A trace can contain a stray word in English or another language; Arabic is the weakest language in the audit.
107
+ - **Answers are not verified.** Translation only checks that the boxed answer is unchanged from the source.
108
+ - **Fine-tuning side effects.** Models trained on it lose some accuracy and loop on about a fifth of non-English prompts until an RL stage removes the looping; see [Qwen3-8B-SFT-Math-Multilingual](https://huggingface.co/96kevinli29/Qwen3-8B-SFT-Math-Multilingual).
 
109
 
110
  ## Citation
111
 
 
118
  }
119
 
120
  @misc{sft-math-multilingual-56k-2026,
121
+ title = {{SFT-Math-Multilingual-56k}: long chain-of-thought math solutions in six languages},
122
  author = {Li, Hongyang and Li, Xiao and Wu, Caesar and Danoy, Gr{\'e}goire and Bouvry, Pascal and {Sea-Fill Community}},
123
  year = {2026},
124
  publisher = {Hugging Face},
 
127
  }
128
  ```
129
 
130
+ Built and released by the authors together with the [Sea-Fill Community](https://huggingface.co/SeaFill2025), which maintains this release.
131
 
132
  Please also cite [OpenR1-Math-220k](https://huggingface.co/datasets/open-r1/OpenR1-Math-220k), the source of the English traces.
assets/sft_effect_8b.png ADDED

Git LFS Details

  • SHA256: 17878bef4aad84ba4a839dab0617e3ef1f76bc9781294fbb012bff69e6482190
  • Pointer size: 130 Bytes
  • Size of remote file: 70.8 kB