Model Details
- Base model: openai/gpt-oss-20b
- Adapter type: LoRA (PEFT)
- Fine-tuning task: Causal language modeling / reasoning
- Languages: English, Spanish, French, Italian, German
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.
Usage
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))
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