Qwen3.5-9B-Kazakh

Qwen3.5-9B-Kazakh is a Kazakh adaptation of Qwen/Qwen3.5-9B. It extends the tokenizer with an additional Kazakh vocabulary for more efficient tokenization, is continued-pretrained on Kazakh text, and is then re-aligned to the official instruct model. This makes the model more efficient on Kazakh text and adds knowledge, while preserving the capabilities of the base model.

Methodology

This model is produced in two stages on top of our Kazakh continued-pretraining model issai/Qwen3.5-9B-Base-Kazakh, the official Qwen/Qwen3.5-9B-Base continued-pretrained on Kazakh text with a +16K Kazakh-token vocabulary extension. No additional post-training (SFT, RLHF, or RLVR) is used.

1. Chat-vector merge, transferring instruct alignment

We transfer the instruction-following / chat alignment of the official post-trained model using the chat vector method (Huang et al., 2024). Let

The chat vector is the task vector of post-training,

τchat=θinstθbase,\tau_\text{chat} = \theta_\text{inst} - \theta_\text{base},

and it is added to our Kazakh continued-pretraining model:

θmerged=θcpt+τchat=θcpt+(θinstθbase),\theta_\text{merged} = \theta_\text{cpt} + \tau_\text{chat} = \theta_\text{cpt} + (\theta_\text{inst} - \theta_\text{base}),

applied per parameter tensor, by name. Because our tokenizer is vocabulary-extended, the input-embedding and output (lm_head) matrices are merged row-wise: the shared original-vocabulary rows receive the chat vector, while the 16K new Kazakh-token rows are kept from θ_cpt (the official models have no counterpart for them). embed_tokens and lm_head are untied and are merged independently.

Special-token pinning. The rows of the format-control special tokens <think>, </think>, <|im_start|>, <|im_end|> and <|endoftext|> (in both the embedding and lm_head) are set to the official post-trained model's exact values instead of the merged values. These few rows drive the chat template's control flow (emitting </think> to close the reasoning block and <|im_end|> to end the turn). The raw chat vector otherwise detunes them and breaks this template logic, causing the model to loop and never terminate. Pinning them restores reliable termination while preserving the Kazakh knowledge acquired during continued pretraining.

2. Vision re-integration, restoring multimodality

Because our continued pretraining was performed on text only, with the vision branch removed beforehand, the chat-vector merge operates on the language model and produces a text-only model. To restore image and video understanding, the vision encoder and multimodal projector from the official Qwen/Qwen3.5-9B are re-attached to this Kazakh-adapted, instruct-aligned language backbone, and the architecture is set back to Qwen3_5ForConditionalGeneration. The result is a multimodal model that largely preserves the official model's vision capabilities while its language model handles Kazakh (and English) with instruct-style alignment and correct <think>...</think> reasoning.

Evaluation

We evaluate Qwen3.5-9B-Kazakh against its base model Qwen3.5-9B on Kazakh and English benchmarks under identical settings (thinking mode enabled):

  • temperature = 1.0
  • top_p = 0.95
  • top_k = 20
  • presence_penalty = 1.5
  • max_tokens = 81920

Scores are accuracy (%).

⚠️ Note on reasoning-heavy benchmarks. The custom model tends to reason more briefly (shorter chains-of-thought) than the original Qwen model, and this is most visible on the hardest problems. The largest regressions therefore appear on the hardest reasoning benchmarks in our evaluation set, such as PolyMath (14.0 pts lower) and GPQA-Diamond (8.1 pts lower), while on easier benchmarks the effect is minimal and the model preserves the original Qwen model's capabilities.

⚠️ Note on vision benchmarks. The merged model was not explicitly trained on vision tasks, which accounts for some degradation on the vision benchmarks. These results can be further improved with dedicated vision-language finetuning.

Kazakh

The Kazakh benchmarks (most of which are available in the ISSAI Qolda suite: language, vision) use Kazakh questions and answer choices. KazMMLU and KazCulture are native Kazakh benchmarks; the rest are Kazakh adaptations of the standard benchmarks.

Text
BenchmarkQwen3.5‑9BQwen3.5‑9B-Kazakh
KazMMLU77.083.1
KazCulture49.563.4
MMLU82.682.8
MMLU-Pro74.873.7
GPQA68.963.9
ARC-Easy97.297.5
ARC-Challenge94.994.4
GSM8K90.489.4
Belebele87.387.9
MMLU-Redux85.184.0
Vision
BenchmarkQwen3.5‑9BQwen3.5‑9B-Kazakh
AI2D83.583.4
MMStar75.672.9
RealWorldQA74.872.7
MathVista80.680.5
OCRBench35.834.9
MathVision77.173.5
MMBench90.290.4

English

Text
BenchmarkQwen3.5‑9BQwen3.5‑9B-Kazakh
MMLU88.486.9
MMLU-Pro82.980.1
GPQA-Diamond84.376.3
GPQA-Main78.675.0
ARC-Easy99.098.2
ARC-Challenge97.196.4
GSM8K96.894.2
Belebele97.896.9
MMLU-Redux89.788.8
Vision
BenchmarkQwen3.5‑9BQwen3.5‑9B-Kazakh
AI2D89.788.0
MMStar78.076.9
RealWorldQA80.575.3
MathVista85.984.2
OCRBench87.184.3
MathVision80.074.7
MMBench91.090.5

Model usage

The following package versions are used:

  • transformers>=5.12.1
  • a recent torch build (matching your CUDA)
  • vllm>=0.24.0 (for serving)
  • optional: flash-linear-attention and causal-conv1d for faster linear-attention inference

The model reasons by default, emitting a chain-of-thought inside <think> ... </think>.

Transformers

from transformers import AutoProcessor, AutoModelForMultimodalLM

model_id = "issai/Qwen3.5-9B-Kazakh"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(model_id, dtype="auto", device_map="auto")

messages = [
    {"role": "user", "content": [{"type": "text", "text": "Балқаш көлінің қандай ерекшелігі бар?"}]}
]

inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt",
).to(model.device)

outputs = model.generate(
    **inputs, max_new_tokens=32768,
    do_sample=True, temperature=1.0, top_p=0.95, top_k=20,
)

print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Image input:

messages = [
    {"role": "user", "content": [
        {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
        {"type": "text", "text": "Суретте не бейнеленген?"},
    ]}
]

inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt",
).to(model.device)

outputs = model.generate(
    **inputs, max_new_tokens=32768,
    do_sample=True, temperature=1.0, top_p=0.95, top_k=20,
)

print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

To disable thinking, pass enable_thinking=False to apply_chat_template.

vLLM

Serve an OpenAI-compatible endpoint:

vllm serve issai/Qwen3.5-9B-Kazakh \
    --served-model-name qwen \
    --reasoning-parser qwen3 \
    --max-model-len 90000
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")

resp = client.chat.completions.create(
    model="qwen",
    messages=[{"role": "user", "content": """Төмендегі экзопланеталардың қайсысында тығыздығы ең жоғары?
a) Жермен бірдей құрамы бар, бірақ Жерден 5 есе ауыр планета.
b) Жермен бірдей құрамды, бірақ Жерден екі есе жеңіл планета.
c) Массасы Жерден 2 есе үлкен және тығыздығы шамамен 5.5 г/см^3 болатын планета.
d) Жердің массасы мен радиусымен тең планета."""}],
    max_tokens=81920, temperature=1.0, top_p=0.95, presence_penalty=1.5,
    extra_body={"top_k": 20},
)

print(resp.choices[0].message.reasoning)          # chain-of-thought
print(resp.choices[0].message.content)            # final answer

Image input:

import base64

image = base64.b64encode(open("image.png", "rb").read()).decode()

resp = client.chat.completions.create(
    model="qwen",
    messages=[{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image}"}},
        {"type": "text", "text": "Суретте қандай фигуралар бар?"},
    ]}],
    max_tokens=81920, temperature=1.0, top_p=0.95, presence_penalty=1.5,
    extra_body={"top_k": 20},
)

print(resp.choices[0].message.content)

To disable thinking, add "chat_template_kwargs": {"enable_thinking": false} to extra_body.

License

This model is released under the Apache 2.0 license, inherited from the original Qwen3.5 model.

Downloads last month
172
Safetensors
Model size
10B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for issai/Qwen3.5-9B-Kazakh

Finetuned
(1)
this model
Quantizations
2 models

Collection including issai/Qwen3.5-9B-Kazakh

Paper for issai/Qwen3.5-9B-Kazakh