DEV.co
Open-Source LLM · unsloth

gpt-oss-20b-BF16

gpt-oss-20b is OpenAI's 21-billion-parameter open-weight model designed for lower-latency reasoning tasks, local deployment, and specialized use cases. It uses a mixture-of-experts architecture with only 3.6B active parameters, allowing it to run on modest hardware (16GB VRAM). The model is licensed under Apache 2.0, supports fine-tuning, and integrates with popular inference frameworks like vLLM, Transformers, and Ollama. It requires the proprietary 'harmony' response format for correct operation.

Source: HuggingFace — huggingface.co/unsloth/gpt-oss-20b-BF16
20.9B
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
96.9k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Developerunsloth
Parameters20.9B
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads96.9k
Likes34
Last updated2025-08-05
Sourceunsloth/gpt-oss-20b-BF16

What gpt-oss-20b-BF16 is

gpt-oss-20b is a 20.9B-parameter MoE-based transformer trained on OpenAI's harmony response format. It uses native MXFP4 quantization in the MoE layer, reducing memory footprint. The model supports configurable reasoning effort (low/medium/high) and exposes full chain-of-thought outputs. It includes agentic capabilities (function calling, web browsing, Python execution, structured outputs) and is available in BF16 precision. Not gated; ~97k downloads as of August 2025. Context length is not documented.

Quickstart

Run gpt-oss-20b-BF16 locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
from transformers import pipelinepipe = pipeline("text-generation", model="unsloth/gpt-oss-20b-BF16")out = pipe("Explain retrieval-augmented generation in one sentence.",           max_new_tokens=128)print(out[0]["generated_text"])

Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.

Deployment

How you'd run it

A typical self-hosted path — open weights, an inference server, your application.

DEV.co builds each layer — from GPU infrastructure to the application.

Best use cases

Local/On-premise Reasoning Workflows

The 20b model fits in 16GB VRAM with MXFP4 quantization, enabling deployment on edge servers, on-prem clusters, or consumer GPU hardware without external API calls. Ideal for regulated industries requiring data residency.

Fine-tuned Domain-Specific Reasoning

Smaller footprint than gpt-oss-120b allows parameter fine-tuning on single-GPU machines. Suited for specialized reasoning in legal analysis, medical consultation, financial modeling, or code generation with proprietary corpora.

Agentic Systems & Tool Integration

Native function-calling, browsing, and code-execution capabilities simplify building autonomous agents. Configurable reasoning effort enables cost-latency tradeoffs in multi-step workflows.

Running & fine-tuning it

**ESTIMATE (requires verification):** 16GB VRAM with BF16 + MXFP4 MoE quantization. Full precision would require ~42GB (20.9B params × 2 bytes). Inference on single H100 or RTX 4090 claimed feasible. Fine-tuning on consumer hardware (single 24GB GPU) plausible with LoRA; full parameter fine-tuning on 40GB+ GPU recommended. CPU inference possible via Ollama/llama.cpp but significantly slower.

Card states model is 'fully fine-tunable' and emphasizes the smaller 20b variant can be fine-tuned on consumer hardware. LoRA and parameter-efficient tuning strategies are strongly implied as viable. Full fine-tuning example uses Harmony format—ensure tuning data adheres to this format. No mention of quantization-aware training; MXFP4 compatibility during fine-tuning unknown and requires testing.

When to avoid it — and what to weigh

  • Highest Accuracy/Reasoning Demands — gpt-oss-120b is positioned for 'production, general purpose, high reasoning.' If your task requires maximum reasoning depth and model scale is not a constraint, the 120b variant may be better; no benchmarks provided for 20b vs. 120b comparison.
  • Strict No-Chain-of-Thought Requirement — The model exposes internal reasoning in all outputs. If end-users or downstream systems cannot tolerate or handle chain-of-thought output, filtering or post-processing is required; not trivial for production systems.
  • Harmony Format Incompatibility — Model is trained on OpenAI's harmony response format and 'will not work correctly otherwise.' Requires tight integration with harmony-compatible tooling; non-standard prompt formats will degrade quality.
  • Very Low-Latency Inference (Sub-100ms) — Even at 20B parameters with 3.6B active, achieving sub-100ms latency on consumer hardware is not confirmed. Quantization and batching strategies depend on specific serving setup; no latency benchmarks provided.

License & commercial use

Apache License 2.0 (OSI-approved, permissive open-source license). No copyleft or patent restrictions. Allows commercial use, modification, and redistribution with attribution.

Apache 2.0 is OSI-compliant and explicitly permits commercial deployment. Card states: 'Permissive Apache 2.0 license: Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment.' No additional restrictions detected. Model is not gated. Standard Apache 2.0 obligations apply: retain license text and copyright notices in derivative works.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

No explicit security audit results or adversarial robustness claims provided in card. Chain-of-thought output may leak internal reasoning; filter before exposing to end-users if sensitive. Standard LLM risks apply: potential for hallucination, misuse in content generation, and prompt injection in agentic workflows. MXFP4 quantization and MoE architecture add non-standard attack surface; recommend security review before high-stakes deployment. No known CVEs or security advisories noted in provided data.

Alternatives to consider

gpt-oss-120b

OpenAI's larger variant (117B params, 5.1B active) fits single H100, targets 'production, general purpose, high reasoning.' Choose if reasoning quality trumps latency/cost; same license and format.

Meta Llama 3.1 (70B variant)

Llama 3.1 is Llama 2-licensed (permissive for research; commercial use requires agreement review) and widely deployed. No mandatory format constraint. Larger, but no MoE sparsity; larger memory footprint. Well-established ecosystem.

Mistral 7B or Mixtral 8x7B

Smaller alternatives with established community. Mixtral is MoE-based (12B active params, similar sparsity logic). Apache 2.0 license. Less reasoning capability but lower deployment cost; no harmony format dependency.

Software development agency

Ship gpt-oss-20b-BF16 with senior software developers

Start with local inference using Ollama or vLLM, verify harmony format compatibility in your pipeline, and validate reasoning output quality on representative tasks before committing to fine-tuning or production integration.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

gpt-oss-20b-BF16 FAQ

Can I use gpt-oss-20b commercially?
Yes. The Apache 2.0 license is OSI-approved and explicitly permits commercial use, modification, and redistribution. You must retain the original license and copyright notices in derived works. No additional licensing agreement is required.
What is the harmony response format and why is it required?
Harmony is OpenAI's proprietary prompt/response format. The model is trained exclusively on it and 'will not work correctly otherwise.' You must use the harmony format for all inputs; Transformers chat templates and the openai-harmony Python package provide automatic formatting. Non-compliance will degrade output quality.
What GPU do I need to run gpt-oss-20b locally?
Estimated 16GB VRAM minimum with BF16 + MXFP4 quantization (e.g., RTX 4090, single H100). Exact requirements depend on batch size and inference framework (vLLM vs. Transformers vs. Ollama). Verify with your target hardware before deployment. CPU inference via Ollama is possible but slow.
Can I fine-tune this model on my laptop or consumer GPU?
Yes, the card explicitly states the 20b model can be fine-tuned on consumer hardware. Use parameter-efficient methods (LoRA, QLoRA) on 24GB+ GPUs. Full fine-tuning requires 40GB+. Ensure fine-tuning data follows the harmony response format for consistency.

Work with a software development agency

Need help beyond evaluating gpt-oss-20b-BF16? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source llms integrations — and maintain them long-term.

Ready to Deploy gpt-oss-20b?

Start with local inference using Ollama or vLLM, verify harmony format compatibility in your pipeline, and validate reasoning output quality on representative tasks before committing to fine-tuning or production integration.