olumideola commited on
Commit
9f3a109
·
verified ·
1 Parent(s): f443b3a

MIST-QG-1.0: same-language + cross-lingual stages, model card and benchmarks

Browse files
Files changed (6) hide show
  1. README.md +219 -0
  2. bench_african.png +0 -0
  3. bench_all.png +0 -0
  4. bench_crosslingual.png +0 -0
  5. model.safetensors +1 -1
  6. step.json +0 -1
README.md ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3.5-4B-Base
4
+ pipeline_tag: text-generation
5
+ library_name: transformers
6
+ tags:
7
+ - question-generation
8
+ - query-generation
9
+ - synthetic-data
10
+ - retrieval
11
+ - multilingual
12
+ - african-languages
13
+ - cross-lingual
14
+ language:
15
+ - multilingual
16
+ - en
17
+ - fr
18
+ - yo
19
+ - ig
20
+ - ha
21
+ - sw
22
+ - zu
23
+ - xh
24
+ - am
25
+ - so
26
+ - rw
27
+ - rn
28
+ - af
29
+ - om
30
+ - ti
31
+ - sn
32
+ - st
33
+ - tn
34
+ - mg
35
+ - ln
36
+ - wo
37
+ - ee
38
+ - tw
39
+ - ny
40
+ - lg
41
+ ---
42
+
43
+ # MIST-QG-1.0
44
+
45
+ MIST-QG-1.0 reads a passage and writes the questions that the passage answers. The questions can be in the
46
+ passage's own language or in English or French. It is a 4B model, a full fine-tune of
47
+ [Qwen3.5-4B-Base](https://huggingface.co/Qwen/Qwen3.5-4B-Base), built to make retrieval training data. It covers 324
48
+ languages, with a focus on African languages.
49
+
50
+ It is part of the Olaverse **MIST** family, alongside MIST-Embed and MIST-Rerank. Its job is to turn raw
51
+ passages, in any of those languages, into query–passage pairs that an embedder or reranker can learn from.
52
+
53
+ Each chart below shows the share of a model's questions that are **usable**, so **higher is better**. A question is
54
+ usable when the passage answers it, it finds its own passage in search, it isn't copied from the passage, and it's
55
+ in the language that was asked for. The [Evaluation](#evaluation) section has the details.
56
+
57
+ ![Cross-lingual benchmark](bench_crosslingual.png)
58
+
59
+ ![Same-language benchmark, all languages](bench_all.png)
60
+
61
+ ![Same-language benchmark, African languages](bench_african.png)
62
+
63
+ ## What it is good at
64
+
65
+ - **Questions in your own words, not copies.** Training targets that lifted a sentence from the passage were
66
+ removed. Only 7.5% of its questions copy the passage, and on African languages it copies slightly less than
67
+ Llama 3.3 70B (9.1% against 12.5%).
68
+ - **Cross-lingual questions.** Ask for English questions on a Hausa, Oromo or Malagasy passage, and 99.7% of
69
+ them come back in the requested language. 77% are fully usable, against 64% for Gemma 4 31B and 68% for Llama
70
+ 3.3 70B.
71
+ - **Small and fast.** At 4B it runs comfortably on a single GPU with vLLM, so generating questions for millions of
72
+ passages is practical.
73
+
74
+ ## How to use it
75
+
76
+ The prompt is plain text, with no chat template. Write the language names out in full, such as "Yoruba", "Hausa"
77
+ or "English".
78
+
79
+ ```
80
+ Passage (<passage language>):
81
+ <passage, up to ~2,000 characters>
82
+
83
+ Questions in <question language> that this passage answers, in your own words:
84
+ ```
85
+
86
+ The model answers with one question per line, each starting with `- `, and then stops.
87
+
88
+ ### vLLM (recommended)
89
+
90
+ ```python
91
+ from vllm import LLM, SamplingParams
92
+
93
+ PROMPT = ("Passage ({lang}):\n{passage}\n\n"
94
+ "Questions in {qlang} that this passage answers, in your own words:\n")
95
+
96
+ llm = LLM(model="olaverse/MIST-QG-1.0", max_model_len=4096)
97
+ params = SamplingParams(max_tokens=256, temperature=0.3, top_p=0.9, stop=["\n\n"])
98
+
99
+ passage = "Ọjà Ọ̀jọ̀ jẹ́ ọjà ìbílẹ̀ tó gbajúmọ̀ ní ìlú Ìbàdàn..."
100
+ prompts = [PROMPT.format(lang="Yoruba", qlang="Yoruba", passage=passage), # same language
101
+ PROMPT.format(lang="Yoruba", qlang="English", passage=passage)] # cross-lingual
102
+
103
+ for out in llm.generate(prompts, params):
104
+ questions = [l[2:].strip() for l in out.outputs[0].text.split("\n") if l.startswith("- ")]
105
+ print(questions)
106
+ ```
107
+
108
+ ### Transformers
109
+
110
+ ```python
111
+ import torch
112
+ from transformers import AutoModelForImageTextToText, AutoTokenizer
113
+
114
+ tok = AutoTokenizer.from_pretrained("olaverse/MIST-QG-1.0")
115
+ model = AutoModelForImageTextToText.from_pretrained("olaverse/MIST-QG-1.0", dtype=torch.bfloat16).cuda()
116
+
117
+ prompt = ("Passage (Hausa):\n" + passage + "\n\n"
118
+ "Questions in English that this passage answers, in your own words:\n")
119
+ ids = tok(prompt, return_tensors="pt").input_ids.cuda()
120
+ out = model.generate(ids, max_new_tokens=256, do_sample=True, temperature=0.3, top_p=0.9)
121
+ print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
122
+ ```
123
+
124
+ Qwen3.5 is a vision-language architecture, so the model loads with `AutoModelForImageTextToText`. MIST-QG uses
125
+ only its text side.
126
+
127
+ ## Evaluation
128
+
129
+ All systems saw the same held-out passages, which were never used in training:
130
+
131
+ - **Same language:** 2,249 test passages in 238 languages, capped at 12 passages per language. Every African-language
132
+ test passage was kept.
133
+ - **Cross-lingual:** 340 passages in 153 languages, with questions requested in English (89%) or French (11%).
134
+
135
+ Each question is checked four ways, and it counts as **usable** only if it passes all four:
136
+
137
+ 1. **Answerable.** Qwen3.6-35B-A3B grades from 0 to 3 whether the passage answers the question; it must score at
138
+ least 2.
139
+ 2. **Finds its passage.** Qwen3-Embedding-8B, given only the question, must rank the question's own passage first
140
+ among all test passages in that language. For the cross-lingual test, the pool is all 340 cross-lingual passages.
141
+ 3. **Not copied.** Fewer than 60% of the question's word 3-grams may also appear in the passage.
142
+ 4. **Right language.** GlotLID must identify the language that was asked for.
143
+
144
+ The other models were given a plain instruction asking for up to six questions in the target language, written in
145
+ their own words. The "reference questions" are the dataset's own questions for the same passages.
146
+
147
+ | Usable share | All languages | African | Cross-lingual | Cross-lingual, African passages |
148
+ |---|---|---|---|---|
149
+ | **MIST-QG-1.0 (4B)** | 0.445 | 0.363 | **0.768** | **0.682** |
150
+ | MIST-QG, same-language stage only | 0.447 | 0.382 | 0.005 | 0.003 |
151
+ | Gemma 4 31B | 0.562 | 0.420 | 0.643 | 0.565 |
152
+ | Llama 3.3 70B | 0.497 | 0.359 | 0.676 | 0.602 |
153
+ | Reference questions | 0.493 | 0.410 | 0.900 | 0.875 |
154
+
155
+ | MIST-QG-1.0, details | All languages | African | Cross-lingual |
156
+ |---|---|---|---|
157
+ | Questions per passage | 1.79 | 2.48 | 1.00 |
158
+ | Real questions | 99.8% | 99.8% | 100% |
159
+ | Copied from passage | 7.5% | 9.1% | 0.0% |
160
+ | In the right language | 89.6% | 94.5% | 99.7% |
161
+ | Answerable (judge, 0–1) | 0.856 | 0.851 | 0.821 |
162
+ | Finds its passage (R@1) | 0.630 | 0.504 | 0.918 |
163
+
164
+ **How to read this:**
165
+
166
+ - **Answerability matches the reference questions** (0.856 against 0.859). Most of the remaining gap is
167
+ round-trip retrieval: MIST-QG's questions are a little more general than the bigger models', so they find
168
+ their own passage less often.
169
+ - **Why the reference questions score below Gemma.** About 80% of them are real FAQ questions. They are as
170
+ answerable as Gemma's (0.857 against 0.845) but less specific, so search finds their exact passage less often
171
+ (0.632 against 0.697). Gemma reads the passage and fills its questions with the passage's own names and numbers.
172
+ The reference line is a yardstick, not a ceiling.
173
+ - **The cross-lingual stage cost a little on African same-language questions** (usable 0.382 → 0.363). On all
174
+ languages the score is unchanged.
175
+ - **The bigger models write six questions per passage; MIST-QG writes about two.** Every figure here is a share
176
+ of questions, so it measures quality, not quantity.
177
+
178
+ ## Training
179
+
180
+ **Stage 1, same language.**
181
+ - **Data:** 991k passages in 324 languages, each paired with up to six questions in its own language. Sources:
182
+ WebFAQ, MQA, MIRACL, TyDi QA, parts of the KaLM fine-tuning collection, and LLM-written questions on FineWeb-2,
183
+ WURA and AfriCLIRMatrix passages.
184
+ - **Filtering:** only real questions were kept. Questions that lift a sentence from the passage were removed (tone
185
+ marks are ignored when matching), and duplicates were dropped.
186
+ - **Run:** one epoch of 7,746 steps at 128 passages per step. Learning rate 2e-5, cosine decay to 10%, 200 warm-up
187
+ steps.
188
+
189
+ **Stage 2, cross-lingual.**
190
+ - **Data:** 36.5k passages in about 300 languages, each with a question in English or French, mixed with 60k
191
+ same-language passages from stage 1 so the model keeps its same-language skill.
192
+ - **Run:** 755 steps, learning rate 1e-5, 30 warm-up steps.
193
+
194
+ **Both stages:**
195
+ - **Loss:** computed on the question tokens only.
196
+ - **Precision and optimiser:** bf16, gradient checkpointing, 8-bit AdamW (β = 0.9, 0.95).
197
+ - **Sequence length:** up to 1,024 tokens.
198
+ - **Hardware:** one A100 80 GB.
199
+
200
+ The test passages of both evaluations were held out from all training.
201
+
202
+ ## Limitations
203
+
204
+ - **Copying in the rarest languages.** For a handful of very low-resource languages, such as Ga, Kimbundu,
205
+ Umbundu, Luba-Kasai and Aymara, the model still mostly copies the passage. Treat questions in languages with
206
+ little training data with care, and run a copy check on its output.
207
+ - **One question per passage in cross-lingual mode.** The cross-lingual training data had a single question per
208
+ passage, so that is what the model writes. To get more, sample several times.
209
+ - **Limited cross-lingual directions.** The question language is almost always English or French, and the
210
+ passages are mostly African languages. Other directions, such as Yorùbá questions on an English passage, were
211
+ not trained.
212
+ - **Measured by models, not people.** Answerability is judged by an LLM and retrieval by an embedder. These are
213
+ strong proxies, but not human ratings. Some per-language samples are small; Yorùbá has only 12 test passages.
214
+ - **Questions only.** It does not write answers, keyword queries or claims.
215
+
216
+ ## License
217
+
218
+ The model is released under Apache-2.0, the licence of its base model, Qwen3.5-4B-Base. The training data combines
219
+ sources under their own licences: Apache-2.0, CC-BY-4.0, CC-BY-SA (Wikipedia text) and ODC-BY (FineWeb-2).
bench_african.png ADDED
bench_all.png ADDED
bench_crosslingual.png ADDED
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:12e8cfcf796029259de5d17d6770afb4b0ef07b3284cad310a014b751183971f
3
  size 9078620536
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f23e544bb559edef295bf7809dfd6990e9e7bef655f455aeda416596a78b5c73
3
  size 9078620536
step.json DELETED
@@ -1 +0,0 @@
1
- {"step": 7745, "time": 1794535272.2371998}