FAQ

Fine-tuning

Fine-tuning Qwen: multilingual data and the variant question

Strong non-English coverage, a wide family including vision and coding variants, and the thinking-mode templates that need separate handling.

Qwen's distinguishing features for data preparation are breadth and multilingual strength: the family spans a very wide size range with specialised variants, and the base models are genuinely competent outside English.

Multilingual competence changes your data plan

The Qwen base models have substantially better non-English coverage than much of the open field, Chinese especially but by no means only. That matters because it changes which stage of training you need.

A scatter chart of instruction-following scores (42 to 56) against the percentage of uniformly multilingual tuning data (0 to 100). Light blue points for individual languages spread widely; a red line for the non-English average rises from about 46.5 to about 50 at 1% and stays near 50; an orange English line drifts from 50 down to about 44 at 90 to 100%.
Instruction-following scores for PaLM 2-S, the paper's base model, as a growing share of the tuning set is spread across 12 languages, from English only (left) to fully uniform (right). The non-English average (red) jumps as soon as about 1% of the data is multilingual and then holds near the English-only level, while English (orange) slips two to three points from 30% multilingual and falls five to six only at 90% or more. A small multilingual share goes a long way. Image: Figure 3 of the paper · CC BY 4.0 · from Shaham et al. 2024, “Multilingual Instruction Tuning With Just a Pinch of Multilinguality”, arXiv:2401.01854

The usual assumption with a non-English application is that you need continued pretraining to give the model the language. If the base model already has reasonable competence, you do not — you need instruction data in that language to teach it to respond in it, which is a far smaller and cheaper dataset.

So test before you plan. Prompt the instruct model in your target language with a few examples and read the output critically. If the language is fluent and only the format or register is wrong, you are in behaviour territory: hundreds to a few thousand examples. If the language itself is weak, that is a knowledge gap and continued pretraining applies, which is orders of magnitude more data.

A grouped bar chart of 'Compression Ratio' by language for five tokenizers, LLaMA-7B, Baichuan-7B, ChatGLM2-6B, InternLM-7B and Qwen, across Thai, Hebrew, Arabic, Korean, Vietnamese, Chinese, Japanese, Turkish, Indonesian, Polish, Russian, Dutch, Portuguese, Italian, German, Spanish, French, English and code. Qwen's bar is the shortest or close to it in most languages, most visibly Thai, Hebrew, Korean and Vietnamese.
Encoding compression measured against XLM-R (the baseline of 1, not drawn) for the first-generation Qwen-7B tokenizer and four others, on a million documents per language; shorter bars are the efficient end. Qwen's tech memo ties this to training and inference efficiency outside Chinese and English: the same token budget carries more Thai or Korean text. It is one reason the base model's non-English competence is worth testing before you plan continued pretraining. Image: QwenLM/Qwen · Apache-2.0 repository

Pick the right variant before preparing data

This family is unusually broad, and the variant determines what your data has to look like. The families include general instruct models across a wide size range, coding-specialised releases, maths-specialised releases, vision-language models, and reasoning or thinking-oriented models.

The data implications differ substantially. A vision-language variant needs image-text pairs with the images referenced in a model-specific per-row shape. A coding variant is already strong at code and should be fine-tuned on your conventions rather than on general programming. A reasoning variant expects and produces extended working, which changes both your sequence length budget and what a good training example looks like.

Starting from a general instruct model when a specialised variant exists for your task usually means paying in data for capability you could have had for free.

A grouped bar chart titled Model Scaling on Multilingual Reasoning: accuracy for Qwen3 4B, 8B, 14B and 32B on the average and on English (59.2 to 71.8), Chinese (55.1 to 69.4), Russian (53.6 to 68.0), Hindi (47.1 to 62.4), Wolof (5.6, 1.3, 11.5, 26.1) and Zulu (9.0, 1.6, 7.4, 17.9).
Qwen3 dense models from 4B to 32B on the same reasoning questions translated into six languages. English rises from 59.2 to 71.8 with size; Wolof and Zulu stay between about 1 and 26, and the 8B model is worse than the 4B on both. For a low-resource language, check the variant you pick on that language before planning any data. Image: Figure 5 of the paper · CC BY 4.0 · from “MMLU-ProX: A Multilingual Benchmark for Advanced Large Language Model Evaluation”, arXiv:2503.10497

Thinking-mode templates need care

Models that produce explicit reasoning traces separate the thinking from the final answer with special tokens, and this is reflected in their chat templates. Unsloth's template collection carries distinct entries for instruct and thinking variants in this family, which is the signal that you cannot treat them interchangeably.

Two consequences for your data. First, if you are fine-tuning a thinking model on data that has no reasoning traces, you are training it to skip the step it was built around — sometimes that is what you want, often it is not, and you should decide deliberately rather than by default. Second, the loss masking question gets more complicated: you may want loss on the reasoning, on the answer, or on both, and the right choice depends on whether you are teaching the reasoning or just the output format.

As ever, render an example and read it. With reasoning models this is doubly worth doing, because the token structure is less familiar and more consequential.

Settings

Standard data contract — a messages list, loss on assistant turns, see the TRL dataset contract. The breadth of the size range is the practical variable here.

A table headed 'Trained on cleaned alpaca dataset'. Rows: baseline Qwen2 1.5B, Qwen2 1.5B fine-tuned with LoRA, baseline Qwen2 0.5B, Qwen2 0.5B fine-tuned with LoRA, and 0.5B distilled from the fine-tuned 1.5B. Columns: TruthfulQA mc2, HellaSwag acc and acc_norm, and commonsense acc. Baseline 0.5B is bold on both HellaSwag columns and commonsense; the distilled model is bold on TruthfulQA.
Qwen2 0.5B and 1.5B after training on Alpaca-cleaned in torchtune. The 0.5B LoRA fine-tune nudges TruthfulQA up, from 0.393 to 0.398, while HellaSwag accuracy falls from 0.391 to 0.362 and the commonsense score from 0.532 to 0.297. That is the quiet regression to look for: evaluate what you meant to keep as well as what you trained for, on the small variant before you scale up. Image: pytorch/torchtune · BSD-3-Clause repository

From Unsloth's memory table: roughly 3.5 GB for a 3B model at 4-bit, 5 GB at 7B, 8.5 GB at 14B, 26 GB at 32B and 41 GB at 70B-class, against 8, 19, 33, 76 and 164 GB respectively for 16-bit LoRA. That spread means you can usually prototype on a small variant and scale up once the data is proven, which is a cheaper way to work than starting large.

Rank 16 to 32, alpha equal to rank or double, 2e-4 for SFT, one to three epochs, and much lower for preference tuning. Note that specific model version strings in this family change quickly — check the current documentation for your checkpoint rather than trusting a version number in any article, including this one.

During training a LoRA adapter never materialises ΔW: it stores the two thin factors and applies them as two small matrix multiplies. For deployment you keep them separate or merge BA into W once. Rank sets capacity, so a rank too low for the shift you are asking for cannot be fixed with more data or more epochs.

Questions people ask

What licence do Qwen models use?

It varies by release, with much of the family under Apache 2.0 and some releases under their own terms. As with every family here, check the specific checkpoint rather than inferring from another model in the family.

Should I use the vision variant for documents?

Often yes. If your inputs are scanned documents or screenshots, a vision-language variant lets you skip a separate OCR stage and its error propagation. The data cost is that you need image-text pairs in that model's expected per-row format, which is more involved than text instruction data.

Can I fine-tune a thinking model to stop showing its working?

Yes, by training on data with final answers only — but consider whether you want that. The reasoning is where the capability comes from on hard tasks, and suppressing it in training can cost accuracy. Hiding the trace at the application layer is often the better answer than training it away.

How much data do I need?

The published figures come from Unsloth's documentation, not from the model's maker: a minimum of 100 rows with over 1,000 preferable for supervised fine-tuning, at 1–3 epochs, and at least 500 rows for GRPO. Nothing is published for DPO-style preference tuning. See how much data for a LoRA for the doubling experiment that answers it for your task rather than in general.

Stop hunting. Start searching.

Tens of thousands of curated datasets, searchable in plain language — with the licence and size checked before you download anything.

Search Dataset Finder →