Model Details
This is a LoRA adapter only — it is not a merged/standalone model. You need the base openai/gpt-oss-20b weights plus this adapter to run it. The repo contains:
adapter_config.json
adapter_model.safetensors
Training Data
Fine-tuned on HuggingFaceH4/Multilingual-Thinking, a reasoning dataset built by sampling 1k training examples from the SystemChat subset of SmolTalk2 and translating the chain-of-thought traces into Spanish, French, Italian, and German using another language model. The English reasoning traces are also retained, so the model sees the same underlying reasoning task expressed across five languages.
This setup is intended to encourage the model to produce coherent step-by-step reasoning regardless of the input/output language, rather than reasoning only in English and translating the final answer.
Training Procedure
- Hardware: 1x NVIDIA H100 80GB
- Method: LoRA (Low-Rank Adaptation) via PEFT
0.19.1
LoRA Configuration
Table with columns: Parameter, Value| Parameter | Value |
|---|
r (rank) | 8 |
lora_alpha | 16 |
lora_dropout | 0.0 |
bias | none |
target_modules | q_proj, k_proj, v_proj, |
The adapter targets both the standard attention projections and a subset of the mixture-of-experts (MoE) expert weights at layers 7, 15, and 23 — chosen to adapt reasoning-relevant expert pathways at early, middle, and late points in the network without fine-tuning all experts.
How to Get Started with the Model
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "openai/gpt-oss-20b"
adapter_id = "artindnr/gpt-oss-20b-multilingual-thinking"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
messages = [
{"role": "user", "content": "Explique el teorema de Pitágoras paso a paso."}
]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Option 2: Unsloth
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "artindnr/gpt-oss-20b-multilingual-thinking",
max_seq_length = 1024,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
messages = [
{"role": "user", "content": "Explique el teorema de Pitágoras paso a paso."}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt = True,
return_tensors = "pt",
return_dict = True,
).to("cuda")
from transformers import TextStreamer
_ = model.generate(**inputs, max_new_tokens = 512, streamer = TextStreamer(tokenizer))
Note: this adapter was trained with plain PEFT (not Unsloth's trainer), using PEFT's target_parameters feature to target specific MoE expert layers directly. Loading through Unsloth should work since it loads adapters via standard PEFT under the hood, but the PEFT/Transformers path above is the one this card's usage was verified against — if you hit a loading issue with Unsloth, fall back to Option 1.
Intended Use
This adapter is intended for research and experimentation on multilingual reasoning in LLMs. It is not evaluated for production or safety-critical use cases.
Limitations
- Trained on a relatively small sample (1k examples), so gains may be narrow or task-specific rather than broadly generalized.
- Reasoning traces in the training data were themselves machine-translated, which may introduce translation artifacts into the model's non-English reasoning style.
- Only 4 non-English languages are covered; performance on other languages is untested.
Citation
If you use this adapter, please also credit the base model and dataset:
@misc{gpt-oss-20b,
title = {gpt-oss-20b},
author = {OpenAI},
howpublished = {\url{https://huggingface.co/openai/gpt-oss-20b}}
}
@misc{multilingual-thinking,
title = {Multilingual-Thinking},
author = {HuggingFaceH4},
howpublished = {\url{https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking}}
}
Author
Fine-tuned and maintained by Artin Daneshvar
GitHub: github.com/Artin200912