CoolFace
Modelpublic

justinj92/gpt-oss-nemo-20b

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
7likes25downloads
Model Card

GPT-OSS-NEMO-20B: Multilingual Thinking Model

Model Description

GPT-OSS-NEMO-20B is a fine-tuned version of OpenAI's GPT-OSS-20B model, specifically enhanced for multilingual reasoning and thinking capabilities. This model has been trained using Supervised Fine-Tuning (SFT) on the HuggingFaceH4/Multilingual-Thinking dataset to improve its ability to reason in multiple languages while maintaining strong performance across diverse linguistic contexts.

Key Features

  • โ€”๐ŸŒ Multilingual Reasoning: Enhanced ability to think and reason in multiple languages
  • โ€”๐Ÿง  Chain-of-Thought: Improved reasoning capabilities with explicit thinking processes
  • โ€”๐Ÿ’ฌ Conversational: Optimized for interactive dialogue and question-answering
  • โ€”๐ŸŽฏ Cross-lingual: Can reason in one language and respond in another
  • โ€”โšก High Performance: Built on the robust 20B parameter GPT-OSS foundation

Training Details

Base Model

  • โ€”Model: openai/gpt-oss-20b
  • โ€”Parameters: 20 billion parameters
  • โ€”Architecture: GPT-OSS (Mixture of Experts)

Fine-tuning Configuration

  • โ€”Method: LoRA (Low-Rank Adaptation)
  • โ€”Rank (r): 8
  • โ€”Alpha: 16
  • โ€”Target Modules: All linear layers with specific focus on MoE expert layers
  • โ€”Target Parameters:
  • โ€”Layer 7, 15, 23 MLP experts (gateupproj, down_proj)

Training Infrastructure

  • โ€”Hardware: 4x NVIDIA H100 GPUs
  • โ€”Cloud Platform: Microsoft Azure NC-series instances
  • โ€”Training Framework: TRL (Transformers Reinforcement Learning)
  • โ€”Optimization: AdamW with cosine learning rate scheduling

Training Hyperparameters

  • โ€”Learning Rate: 2e-4
  • โ€”Batch Size: 4 per device (16 total with 4 GPUs)
  • โ€”Gradient Accumulation: 4 steps
  • โ€”Epochs: 4
  • โ€”Max Sequence Length: 2048 tokens
  • โ€”Warmup Ratio: 3%
  • โ€”LR Scheduler: Cosine with minimum LR (10% of peak)
  • โ€”Gradient Checkpointing: Enabled

Dataset

  • โ€”Name: HuggingFaceH4/Multilingual-Thinking
  • โ€”Purpose: Multilingual reasoning and thinking enhancement
  • โ€”Languages: Multiple languages including English, Spanish, Arabic, French, German, Chinese, Japanese, Korean, Hindi, Russian
  • โ€”Training Split: Full training set

Usage

Quick Start

python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
    "justinj92/gpt-oss-nemo-20b",
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("justinj92/gpt-oss-nemo-20b")

# Example: Multilingual reasoning
messages = [
    {"role": "system", "content": "reasoning language: Arabic"},
    {"role": "user", "content": "ยฟCuรกl es la capital de Australia?"}
]

inputs = tokenizer.apply_chat_template(
    messages, 
    add_generation_prompt=True, 
    return_tensors="pt"
)

outputs = model.generate(
    inputs,
    max_new_tokens=512,
    temperature=0.6,
    do_sample=True
)

response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Advanced Usage with Custom Reasoning Language

python
# Specify reasoning language in system prompt
reasoning_language = "French"  # Can be any supported language
system_prompt = f"reasoning language: {reasoning_language}"

messages = [
    {"role": "system", "content": system_prompt},
    {"role": "user", "content": "Explain quantum computing in simple terms."}
]

Model Capabilities

Multilingual Reasoning

The model can:

  • โ€”Think and reason in a specified language (via system prompt)
  • โ€”Process questions in one language and reason in another
  • โ€”Maintain coherent logic across language boundaries
  • โ€”Provide explanations with explicit reasoning steps

Language Support

Primary languages include:

  • โ€”English (en)
  • โ€”Spanish (es)
  • โ€”Arabic (ar)
  • โ€”French (fr)
  • โ€”German (de)
  • โ€”Chinese (zh)
  • โ€”Japanese (ja)
  • โ€”Korean (ko)
  • โ€”Hindi (hi)
  • โ€”Russian (ru)

Performance

The model demonstrates improved performance in:

  • โ€”Cross-lingual reasoning tasks
  • โ€”Multi-step problem solving
  • โ€”Contextual understanding across languages
  • โ€”Maintaining coherence in multilingual conversations

Limitations

  • โ€”Performance may vary across different languages
  • โ€”Complex reasoning in low-resource languages may be limited
  • โ€”Generated content should be verified for factual accuracy
  • โ€”May exhibit biases present in the training data

Technical Specifications

  • โ€”Model Size: ~20B parameters
  • โ€”Precision: BF16 (Brain Floating Point 16-bit)
  • โ€”Memory Requirements: ~40GB VRAM for inference
  • โ€”Recommended Hardware: NVIDIA A100/H100 or similar high-memory GPUs
  • โ€”Framework Compatibility: transformers, torch, accelerate

Citation

If you use this model in your research, please cite:

bibtex
@misc{gpt-oss-nemo-20b,
  title={GPT-OSS-NEMO-20B: A Multilingual Thinking Model},
  author={justinj92},
  year={2025},
  howpublished={\url{https://huggingface.co/justinj92/gpt-oss-nemo-20b}},
  note={Fine-tuned from openai/gpt-oss-20b using HuggingFaceH4/Multilingual-Thinking}
}

Acknowledgments

  • โ€”Base Model: OpenAI GPT-OSS-20B team
  • โ€”Dataset: HuggingFace H4 team for the Multilingual-Thinking dataset
  • โ€”Infrastructure: Microsoft Azure for cloud computing resources
  • โ€”Framework: Hugging Face transformers and TRL libraries

License

This model is released under the Apache 2.0 license, following the base model's licensing terms.


Model trained on August 2025 using state-of-the-art multilingual reasoning techniques.