GPT-OSS-120B Multilingual Reasoner (with Turkish)
This model is a fine-tuned version of openai/gpt-oss-120b that can generate chain-of-thought reasoning in multiple languages, including Turkish.
IMPORTANT: This version of the model must be used with Unsloth library for inferencing. Refer to MXFP4 variant for using it with vllm, llama.cpp, hf etc.
Model Description
Large reasoning models like OpenAI o3 generate a chain-of-thought to improve the accuracy and quality of their responses. However, most of these models reason in English, even when a question is asked in another language.
This fine-tuned model addresses this limitation by adding a "reasoning language" option to the system prompt, enabling the model to think step-by-step in the user's preferred language. This improves interpretability for non-English speakers who want to understand the model's reasoning process.
Supported Reasoning Languages
- 🇺🇸 English
- 🇪🇸 Spanish
- 🇫🇷 French
- 🇮🇹 Italian
- 🇩🇪 German
- 🇹🇷 Turkish
Example Usage
from unsloth import FastLanguageModel
from transformers import TextStreamer
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "barandinho/gpt-oss-120b-multilingual-reasoner",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
REASONING_LANGUAGE = "Turkish" # can be anything
DEVELOPER_PROMPT = "You are a helpful assistant. Respond in Turkish to the user." # using english here is recommended.
USER_PROMPT = "mükemmeliyetçilik kelimesinde kaç tane m harfi vardır ?"
messages = [
{"role": "system", "content": f"reasoning language: {REASONING_LANGUAGE}\n\n{DEVELOPER_PROMPT}"}, # this should be the format of our system prompt.
{"role": "user", "content": USER_PROMPT},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt = True,
return_tensors = "pt",
return_dict = True,
reasoning_effort = "medium",
).to("cuda")
_ = model.generate(**inputs, max_new_tokens = 2048, temperature=1.0, top_p=1.0, top_k=0, do_sample=True, streamer=TextStreamer(tokenizer))
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-12-28
Reasoning: medium
# Valid channels: analysis, commentary, final. Channel must be included for every message.
Calls to these tools must go to the commentary channel: 'functions'.<|end|><|start|>developer<|message|># Instructions
reasoning language: Turkish
You are a helpful assistant. Respond in Turkish to the user.<|end|><|start|>user<|message|>mükemmeliyetçilik kelimesinde kaç tane m harfi vardır ?<|end|><|start|>assistant<|channel|>analysis<|message|>Tamam, kullanıcı "mükemmeliyetçilik" kelimesinde kaç tane "m" harfi olduğunu soruyor. Adım adım düşünelim.
Öncelikle kelimeyi ayıralım ve her bir harfe bakalım. Şunu yazarak başlayabilirim: "mükemmeliyetçilik". Şimdi harfleri parçalara ayıralım:
- m
- ü
- k
- e
- m
- m
- e
- l
- i
- y
- e
- t
- ç
- i
- l
- i
- k
Verilen listede görünen "m" harfleri:
- Başlangıçta bir tane "m".
- Daha sonra "?m" olarak işaretlenmiş bir öğe var.
- Ayrıca bir tane daha "m" var.
Öyleyse toplam üç tane "m" harfi bulunuyor.
Dolayısıyla, kullanıcı için cevap basit ve açıklansız olabilir. Sonuçlanan söyle? Hayır, "mükemmeliyetçilik" kelimesinde 3 "m" harfi vardır.<|end|><|start|>assistant<|channel|>final<|message|>"Mükemmeliyetçilik" kelimesinde 3 tane **'m'** harfi bulunur. <|return|>
Training Details
Dataset
This model was fine-tuned on barandinho/Multilingual-Thinking-with-Turkish-1185, an extended version of HuggingFaceH4/Multilingual-Thinking that includes Turkish reasoning examples.
- Total examples: 1,185
- Languages: English, Spanish, French, Italian, German, Turkish
Training Configuration
| Parameter | Value |
|---|---|
| Base Model | gpt-oss-120b |
| Fine-tuning Method | LoRA (via Unsloth) |
| LoRA Rank (r) | 16 |
| LoRA Alpha | 32 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable Parameters | 11,943,936 (0.01% of 116B) |
| Max Sequence Length | 3,072 |
| Quantization (Training) | 4-bit |
Training Hyperparameters
| Parameter | Value |
|---|---|
| Learning Rate | 2e-4 |
| Batch Size (per device) | 1 |
| Gradient Accumulation Steps | 4 |
| Effective Batch Size | 4 |
| Epochs | 1 |
| Warmup Ratio | 0.05 |
| LR Scheduler | Linear |
| Optimizer | AdamW 8-bit |
| Weight Decay | 0.001 |
| Total Steps | 297 |
Training Infrastructure
Related Models
- MXFP4 Merged Version: barandinho/gpt-oss-120b-multilingual-reasoner-MXFP4 - A merged version with MXFP4 quantization for efficient deployment.
Acknowledgments
This work is inspired by the OpenAI Cookbook tutorial on fine-tuning gpt-oss-20b
Special thanks to :
- OpenAI for releasing the gpt-oss model family
- HuggingFace for the TRL library and Multilingual-Thinking dataset
- Unsloth for efficient fine-tuning optimizations
- TRUBA for providing H100 GPU infrastructure
Limitations
- The model has been fine-tuned on a relatively small dataset (1,185 examples), so performance may vary across different reasoning tasks.
- While the model can generalize to other languages not explicitly in the training set, quality may be lower compared to the six supported languages.
- Complex mathematical or scientific reasoning performance may be degraded.
Citation
If you use this model, please cite:
@misc{gpt-oss-120b-multilingual-reasoner,
author = {Baran Bingöl},
title = {GPT-OSS-120B Multilingual Reasoner with Turkish},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/barandinho/gpt-oss-120b-multilingual-reasoner}
}
License
This model inherits the license from the base model openai/gpt-oss-120b. Please refer to the base model's license for usage terms.
Model tree for barandinho/gpt-oss-120b-multilingual-reasoner
Base model
openai/gpt-oss-120b