{
 "kind": "model",
 "slug": "openai-gpt-oss-20b",
 "path": "models/open/openai-gpt-oss-20b/",
 "name": "gpt-oss-20b",
 "maker": "OpenAI",
 "density": "full",
 "crumbs": [
  [
   "Models",
   "models/"
  ],
  [
   "Open models",
   "models/open/"
  ]
 ],
 "lead": "OpenAI reasoning model on your computer.",
 "chips": [
  {
   "label": "Text and agents",
   "path": "models/open/"
  },
  {
   "label": "Commercial use"
  },
  {
   "label": "Runs on 32 GB"
  }
 ],
 "primary": {
  "label": "Copy model id",
  "copy": "openai/gpt-oss-20b"
 },
 "links": [
  {
   "label": "Hugging Face",
   "href": "https://huggingface.co/openai/gpt-oss-20b"
  },
  {
   "label": "Demos",
   "href": "https://huggingface.co/spaces?search=gpt-oss-20b"
  }
 ],
 "track": "New versions, price and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": "Apache 2.0",
   "quote": "each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work",
   "note": "Any use is allowed, paid products included; follow applicable law as the usage policy asks.",
   "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/LICENSE"
  },
  {
   "key": "local",
   "label": "On your machine",
   "status": "yes",
   "value": "32 GB of memory",
   "sub": "20.9B parameters, ~12.5 GB at 4-bit",
   "note": "Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.",
   "src": "https://huggingface.co/openai/gpt-oss-20b"
  },
  {
   "key": "api",
   "label": "Through an API",
   "status": "yes",
   "value": "$0.018 / $0.09",
   "sub": "per 1M tokens, AkashML",
   "note": "Cheapest live provider with tool calling, as the provider reports its price.",
   "src": "https://huggingface.co/docs/inference-providers"
  },
  {
   "key": "tools",
   "label": "Tool calling",
   "status": "yes",
   "value": "8 of 8 providers",
   "sub": "8 providers, 8 with tool calling",
   "note": "Providers whose API supports tool calling for this model, as each reports it.",
   "src": "https://huggingface.co/openai/gpt-oss-20b"
  }
 ],
 "vfoot": "Checked against its official pages on Nov 23, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What gpt-oss-20b does",
   "parts": [
    {
     "t": "prose",
     "text": "gpt-oss-20b is an open text model by OpenAI that reasons step by step, calls tools and runs on a machine with 16 GB of memory. It is the smaller of OpenAI's two open-weight models. The files are on Hugging Face, free to use in paid products under the Apache 2.0 license."
    },
    {
     "t": "h3",
     "text": "What people use it for"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Private assistant on a laptop",
       "text": "Run a chat assistant on your own computer with Ollama, so prompts and answers stay on the machine.",
       "idea": false
      },
      {
       "title": "Use it from Python",
       "text": "Load the model with Hugging Face Transformers and call it from your own script or backend.",
       "idea": false
      },
      {
       "title": "Drop-in local server for OpenAI-style apps",
       "text": "Start a local server that accepts the same request format as OpenAI's hosted models, so an existing app can switch to it.",
       "idea": false
      },
      {
       "title": "Agents with tools",
       "text": "Build an agent that calls your functions, browses the web, runs Python and returns answers in a fixed format.",
       "idea": false
      },
      {
       "title": "Choose speed or depth per request",
       "text": "Set the reasoning level to low for quick chat, or medium or high for harder questions, in the system prompt.",
       "idea": false
      },
      {
       "title": "Train it on your own data",
       "text": "Fine-tune it for your own task on ordinary hardware, without a data center.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "gpt-oss-20b popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "5,348",
       "l": "likes on Hugging Face"
      },
      {
       "n": "5.4M",
       "l": "downloads, last 30 days"
      },
      {
       "n": "14",
       "l": "Hugging Face trending score"
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none."
    }
   ]
  },
  {
   "id": "run",
   "nav": "Run it",
   "h2": "Where to run gpt-oss-20b",
   "parts": [
    {
     "t": "h3",
     "text": "Through an API"
    },
    {
     "t": "table",
     "head": [
      "Provider",
      "$ per 1M in / out",
      "Tools",
      "Context"
     ],
     "rows": [
      [
       "AkashML (99.1% up, 24h)",
       "$0.018 / $0.09",
       "Yes",
       "131K"
      ],
      [
       "OpenRouter",
       "$0.024 / $0.112",
       "Yes",
       "131K"
      ],
      [
       "CoreWeave (99.7% up, 24h)",
       "$0.03 / $0.13",
       "Yes",
       "131K"
      ],
      [
       "OpenRouter",
       "$0.03 / $0.13",
       "Yes",
       "131K"
      ],
      [
       "DeepInfra (98.6% up, 24h)",
       "$0.03 / $0.14",
       "Yes",
       "131K"
      ],
      [
       "Parasail (100% up, 24h)",
       "$0.03 / $0.15",
       "Yes",
       "131K"
      ],
      [
       "Amazon Bedrock (100% up, 24h)",
       "$0.07 / $0.15",
       "Yes",
       "131K"
      ],
      [
       "Groq (99.8% up, 24h)",
       "$0.075 / $0.3",
       "Yes",
       "131K"
      ],
      [
       "PrimeIntellect (99.6% up, 24h)",
       "$0.2 / $0.3",
       "Yes",
       "131K"
      ]
     ],
     "num": true
    },
    {
     "t": "small",
     "text": "As reported by each provider via Hugging Face Inference Providers and OpenRouter, checked Nov 26, 2026."
    },
    {
     "t": "h3",
     "text": "On your machine"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Parameters",
       "v": "20.9B"
      },
      {
       "l": "Memory at 4-bit",
       "v": "about 12.5 GB",
       "sub": "Our estimate: 0.6 GB per billion parameters, with room for the context."
      },
      {
       "l": "GGUF builds",
       "v": "60 on Hugging Face",
       "sub": "For llama.cpp, Ollama and LM Studio; e.g. ggml-org/gpt-oss-20b-GGUF"
      },
      {
       "l": "MLX builds",
       "v": "20 on Hugging Face",
       "sub": "For Apple silicon"
      }
     ]
    }
   ]
  },
  {
   "id": "license",
   "nav": "License",
   "h2": "gpt-oss-20b license",
   "parts": [
    {
     "t": "prose",
     "text": "Free to use, change and sell inside paid products under Apache 2.0. If you pass the model files on, include a copy of the license and mark the files you changed."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid product",
       "v": "Yes",
       "status": "yes",
       "sub": "Any use is allowed, paid products included; follow applicable law as the usage policy asks.",
       "quote": "each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work",
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/LICENSE"
      },
      {
       "l": "Ship the weights to users",
       "v": "With conditions",
       "status": "cond",
       "sub": "Shipping the weights or a fine-tuned copy needs a copy of the Apache 2.0 license and a note on changed files.",
       "quote": "You must cause any modified files to carry prominent notices stating that You changed the files",
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/LICENSE"
      },
      {
       "l": "Work for clients",
       "v": "Yes",
       "status": "yes",
       "sub": "You may build and deliver client projects with it under the same Apache 2.0 terms.",
       "quote": "each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work",
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/LICENSE"
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "gpt-oss-20b",
       "me": true,
       "facts": [
        "5,348 likes",
        "Apache 2.0"
       ]
      },
      {
       "name": "Qwen3.8-27B",
       "path": "models/open/qwen-qwen3-8-27b/",
       "why": "Qwen · image-text-to-text",
       "facts": [
        "21.7K likes",
        "Apache 2.0"
       ]
      },
      {
       "name": "Kimi-K3",
       "path": "models/open/moonshotai-kimi-k3/",
       "why": "moonshotai · image-text-to-text",
       "facts": [
        "12K likes",
        "Custom license"
       ]
      },
      {
       "name": "Llama-3.1-8B-Instruct",
       "path": "models/open/meta-llama-llama-3-1-8b-instruct/",
       "why": "meta-llama · text-generation",
       "facts": [
        "9,102 likes",
        "Llama 3.1 license"
       ]
      },
      {
       "name": "Qwen3.8-Flash-Next",
       "path": "models/open/qwen-qwen3-8-flash-next/",
       "why": "Qwen · image-text-to-text",
       "facts": [
        "7,502 likes",
        "Custom license"
       ]
      }
     ],
     "more": "All text and agents models",
     "more_path": "models/open/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Run openai/gpt-oss-20b locally (ollama run gpt-oss:20b, or a transformers pipeline with torch_dtype=\"auto\" and device_map=\"auto\"), always go through the chat template so the harmony format is applied, set \"Reasoning low/medium/high\" in the system prompt, and never show the reasoning text to end users."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install the libraries.",
       "code": "pip install -U transformers kernels torch",
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md"
      },
      {
       "text": "Run the model with a Transformers pipeline (see the \"Use it from Python\" recipe above).",
       "code": null,
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md"
      },
      {
       "text": "Or, on a laptop, pull and run it with Ollama.",
       "code": "ollama pull gpt-oss:20b\nollama run gpt-oss:20b\n",
       "src": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Model id to use"
    },
    {
     "t": "tabs",
     "label": "Where to run",
     "items": [
      {
       "tab": "OpenRouter",
       "intro": "OpenAI-compatible: base URL https://openrouter.ai/api/v1",
       "code": "openai/gpt-oss-20b"
      },
      {
       "tab": "Hugging Face router",
       "intro": "OpenAI-compatible: base URL https://router.huggingface.co/v1",
       "code": "openai/gpt-oss-20b"
      },
      {
       "tab": "Local (GGUF)",
       "intro": "A community GGUF build on Hugging Face; read its card before use.",
       "code": "ggml-org/gpt-oss-20b-GGUF"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Calling model.generate on a plain text prompt",
       "fix": "Use the Transformers chat template (or the openai-harmony package) so the prompt is in harmony format",
       "why": "Without the harmony format the model does not work correctly."
      },
      {
       "dont": "Showing the model's reasoning text to end users",
       "fix": "Show only the final answer; keep the reasoning for logs and debugging",
       "why": "OpenAI says the reasoning may contain made-up or harmful content."
      },
      {
       "dont": "Shipping the reference browser or Python tool from the gpt-oss repository as is",
       "fix": "Write your own browsing backend and lock down the container that runs Python",
       "why": "OpenAI marks these tools as examples, not for production."
      },
      {
       "dont": "Reusing one browser tool object for many requests",
       "fix": "Create a new browser tool instance for every request",
       "why": "The tool caches pages between calls."
      },
      {
       "dont": "Sending it images or audio",
       "fix": "Use a model that reads images, such as Gemma 4 or Qwen3-VL, for pictures",
       "why": "gpt-oss was trained on text only."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Can I use gpt-oss-20b in a paid product?",
       "a": "Yes. It is under Apache 2.0, which allows commercial use; keep the license text with any copies of the files you share.",
       "evidence": {
        "url": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md",
        "quote": "Permissive Apache 2.0 license:"
       }
      },
      {
       "q": "What computer do I need?",
       "a": "OpenAI says it runs within 16 GB of memory; the larger gpt-oss-120b needs one 80 GB GPU.",
       "evidence": {
        "url": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md",
        "quote": "making `gpt-oss-120b` run on a single 80GB GPU (like NVIDIA H100 or AMD MI300X) and the `gpt-oss-20b` model run within 16GB of memory"
       }
      },
      {
       "q": "How do I make it think longer?",
       "a": "Put \"Reasoning high\" in the system prompt; low is fastest, medium is balanced.",
       "evidence": {
        "url": "https://huggingface.co/openai/gpt-oss-20b/raw/main/README.md",
        "quote": "The reasoning level can be set in the system prompts, e.g., \"Reasoning: high\"."
       }
      },
      {
       "q": "Can it read images?",
       "a": "No. It was trained on text only.",
       "evidence": {
        "url": "https://openai.com/index/introducing-gpt-oss/",
        "quote": "We trained the models on a mostly English, text-only dataset, with a focus on STEM, coding, and general knowledge."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "OpenAI"
  ],
  [
   "Task",
   "Text and agents"
  ],
  [
   "Pipeline",
   "text-generation"
  ],
  [
   "On Hugging Face since",
   "Aug 4, 2025"
  ],
  [
   "License",
   "Apache 2.0"
  ],
  [
   "Parameters",
   "20.9B"
  ],
  [
   "Context",
   "131K tokens"
  ],
  [
   "Hugging Face",
   "openai/gpt-oss-20b"
  ]
 ],
 "good": [
  "It works with text only and was trained mostly on English, with a focus on science, coding and general knowledge.",
  "It needs about 16 GB of memory; the files come already compressed to a 4-bit format (MXFP4).",
  "It reads up to 128k tokens at once."
 ],
 "checked_line": "Hand-checked from 7 official pages on Nov 23, 2026; numbers refresh daily.",
 "logo": null
}