GPT-OSS-Nano is a fine-tuned Mixture of Experts (MoE) language model optimized for step-by-step reasoning and problem solving. Built on the GPT-OSS architecture with sparse expert activation, it achieves strong reasoning performance while using only ~3B active parameters per forward pass.
✨ Key Features
Feature
Description
🧠 Sparse MoE
12 experts, 4 active per token — efficient compute
📝 Chain-of-Thought
Fine-tuned on reasoning datasets with step-by-step solutions
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34model = AutoModelForCausalLM.from_pretrained(5"squ11z1/gpt-oss-nano",6 torch_dtype=torch.bfloat16,7 device_map="auto",8 trust_remote_code=True,9)10tokenizer = AutoTokenizer.from_pretrained(11"squ11z1/gpt-oss-nano",12 trust_remote_code=True,13)1415prompt ="""Solve this step by step:
16A store offers 20% off on all items. If a jacket costs $85,
17what is the final price after discount?"""1819inputs = tokenizer(prompt, return_tensors="pt").to(model.device)20outputs = model.generate(21**inputs,22 max_new_tokens=256,23 temperature=0.7,24 do_sample=True,25)26print(tokenizer.decode(outputs[0], skip_special_tokens=True))
⚡ With Unsloth (2x Faster)
python
1from unsloth import FastLanguageModel
23model, tokenizer = FastLanguageModel.from_pretrained(4"squ11z1/gpt-oss-nano",5 dtype=None,6 load_in_4bit=True,# 4-bit quantization for efficiency7)89# For inference10FastLanguageModel.for_inference(model)
📦 With GGUF (llama.cpp)
bash
1# Download the quantized model2wget https://huggingface.co/squ11z1/gpt-oss-nano/resolve/main/gpt-oss-9b-q4_k_m.gguf
34# Run inference5./llama-cli -m gpt-oss-9b-q4_k_m.gguf \6 -p "Solve step by step: What is 15% of 240?"\7 -n 256 --temp 0.7