GPT-OSS 120B

Apache 2.0

OpenAI · 117B (5.1B active) · MoE

نموذج OpenAI المفتوح الرائد بمزيج الخبراء — ٥٢٫٦٪ في SWE-bench. تعرّف على ما إذا كان كرت شاشتك أو جهاز الماك قادرًا على تشغيل GPT-OSS 120B محليًا — 65.4 جيجابايت كحد أدنى، و109 جيجابايت موصى بها.

كيف تستخدم GPT-OSS 120B في Transformers

حمّل GPT-OSS 120B في بايثون عبر مكتبة Transformers من HuggingFace. هذه الأوزان الكاملة غير المكمَّمة، فتحتاج ذاكرة أكبر من ملفات GGUF.

عبر pipeline — الطريقة الأسهل

pip install -U transformers
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="openai/gpt-oss-120b")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)

تحميل النموذج مباشرة

pip install -U transformers
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-120b")
model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))

التوثيق الرسمي: Transformers

كيف تستخدم GPT-OSS 120B في llama.cpp

يحمّل llama.cpp ملف GPT-OSS 120B من HuggingFace مباشرة ويشغّله، إمّا خادمًا متوافقًا مع OpenAI بواجهة ويب أو في الطرفية. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

التثبيت على macOS وLinux

curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

التثبيت عبر WinGet على Windows

winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

نسخة جاهزة من صفحة الإصدارات

# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

البناء من الكود المصدري

git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

عبر Docker

docker model run hf.co/unsloth/gpt-oss-120b-GGUF:Q4_K_M

التوثيق الرسمي: llama.cpp

كيف تستخدم GPT-OSS 120B في Ollama

ينزّل Ollama النموذج ويفتح محادثة محلية بأمر واحد. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

من مكتبة Ollama الرسمية

ollama run gpt-oss:120b

من ملف GGUF على HuggingFace

ollama run hf.co/unsloth/gpt-oss-120b-GGUF:Q4_K_M

التوثيق الرسمي: Ollama

كيف تستخدم GPT-OSS 120B في Pi

Pi وكيل برمجة يعمل في الطرفية. شغّل GPT-OSS 120B على خادم llama.cpp محلي ثم وجّه Pi إليه. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

أضف النموذج إلى Pi

# Install Pi:
npm install -g @earendil-works/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
  "providers": {
    "llama-cpp": {
      "baseUrl": "http://localhost:8080/v1",
      "api": "openai-completions",
      "apiKey": "none",
      "models": [
        {
          "id": "unsloth/gpt-oss-120b-GGUF:Q4_K_M"
        }
      ]
    }
  }
}

شغّل Pi

# Start Pi in your project directory:
pi

التوثيق الرسمي: Pi

كيف تستخدم GPT-OSS 120B في node-llama-cpp

شغّل GPT-OSS 120B من Node.js بلا تثبيت مسبق. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

محادثة مع النموذج

npx -y node-llama-cpp chat hf:unsloth/gpt-oss-120b-GGUF:Q4_K_M

قدّر توافق النموذج مع جهازك

npx -y node-llama-cpp inspect estimate hf:unsloth/gpt-oss-120b-GGUF:Q4_K_M

التوثيق الرسمي: node-llama-cpp

كيف تستخدم GPT-OSS 120B في Docker Model Runner

يشغّل Docker Desktop النموذج محليًا ويتيحه عبر واجهة متوافقة مع OpenAI. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

شغّل النموذج

docker model run hf.co/unsloth/gpt-oss-120b-GGUF:Q4_K_M

التوثيق الرسمي: Docker Model Runner

كيف تستخدم GPT-OSS 120B في LocalAI

LocalAI خادم محلي متوافق مع OpenAI. استبدل {{GGUF_FILE}} باسم ملف GGUF الذي تريده من المستودع unsloth/gpt-oss-120b-GGUF.

التثبيت من ملف تنفيذي

curl https://localai.io/install.sh | sh
# Load and run the model:
local-ai run huggingface://unsloth/gpt-oss-120b-GGUF/{{GGUF_FILE}}

عبر صور Docker

# Pull the image:
docker pull localai/localai:latest-cpu
# Load and run the model:
docker run -p 8080:8080 --name localai -v $PWD/models:/build/models localai/localai:latest-cpu huggingface://unsloth/gpt-oss-120b-GGUF/{{GGUF_FILE}}

التوثيق الرسمي: LocalAI

كيف تستخدم GPT-OSS 120B في Lemonade

Lemonade خادم محلي من AMD يعمل على المعالجات وكروت الشاشة. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

نزّل النموذج

# Download Lemonade from https://lemonade-server.ai/
lemonade pull unsloth/gpt-oss-120b-GGUF:Q4_K_M

شغّل النموذج وحاوره

lemonade run user.gpt-oss-120b-GGUF-Q4_K_M

اعرض كل النماذج المتاحة

lemonade list

التوثيق الرسمي: Lemonade

كيف تستخدم GPT-OSS 120B في Hermes Agent

وكيل Hermes من Nous Research. شغّل GPT-OSS 120B على خادم llama.cpp محلي ثم وجّه Hermes إليه. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

اضبط Hermes

# Install Hermes:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup
# Point Hermes at the local server:
hermes config set model.provider custom
hermes config set model.base_url http://127.0.0.1:8080/v1
hermes config set model.default unsloth/gpt-oss-120b-GGUF:Q4_K_M

شغّل Hermes

hermes

التوثيق الرسمي: Hermes Agent

كيف تستخدم GPT-OSS 120B في OpenClaw

OpenClaw وكيل مفتوح المصدر يعمل على جهازك. شغّل GPT-OSS 120B على خادم llama.cpp محلي ثم سجّله في OpenClaw. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/gpt-oss-120b-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/gpt-oss-120b-GGUF:Q4_K_M

اضبط OpenClaw

# Install OpenClaw:
npm install -g openclaw@latest
# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
  --auth-choice custom-api-key \
  --custom-base-url http://127.0.0.1:8080/v1 \
  --custom-model-id "unsloth/gpt-oss-120b-GGUF:Q4_K_M" \
  --custom-provider-id llama-cpp \
  --custom-compatibility openai \
  --custom-text-input \
  --accept-risk \
  --skip-health

شغّل OpenClaw

openclaw agent --local --agent main --message "Hello from Hugging Face"

التوثيق الرسمي: OpenClaw

أوامر التشغيلHuggingFaceOllamaLM Studio
2025-08سياق 128K

MoE

إجمالي الخبراء: 16
الخبراء النشطون: 2
المعاملات النشطة: 5.1B

مستويات الـ Quantization

Quantizationالبتاتالذاكرةالجودةالحالة
Q2_K238GBمنخفضة—
Q3_K_M352.9GBمتوسطة—
Q4_K_M460.4GBجيدة—
Q5_K_M575.4GBجيدة—
Q6_K690.4GBممتازة—
Q8_08120.4GBممتازة—
F1616240.2GBبلا فقد—

الأرقام تشمل الأوزان وذاكرة KV عند طول سياق 2K توكن. غيّر طول السياق من لوحة جهازك لترى أثره على الذاكرة والسرعة.

التطبيقات

شغّل GPT-OSS 120B داخل أدوات البرمجة التي تعمل بالذكاء الاصطناعي — يشغّل الأمر خادم Ollama على جهازك، يحمّل النموذج، ثم يفتح الأداة موصولة به.

  • Claude Code

    وكيل البرمجة من Anthropic، يعمل في الطرفية وداخل المحرّر

    ollama launch claude --model gpt-oss:120b
  • OpenCode

    وكيل برمجة مفتوح المصدر يعمل في الطرفية داخل مستودعك

    ollama launch opencode --model gpt-oss:120b
  • Codex

    وكيل البرمجة من OpenAI في سطر الأوامر

    ollama launch codex --model gpt-oss:120b
  • Droid

    وكيل البرمجة من Factory، للمهام الطويلة عبر عدّة ملفات

    ollama launch droid --model gpt-oss:120b
  • Hermes Agent

    وكيل برمجة مفتوح من Nous Research، بذاكرة تمتد عبر الجلسات

    ollama launch hermes --model gpt-oss:120b
  • OpenClaw

    وكيل مفتوح المصدر يشغّل المهام على جهازك بلا خدمة سحابية

    ollama launch openclaw --model gpt-oss:120b

تحتاج Ollama والأداة نفسها مثبَّتين. إن لم تكن الأداة مثبّتة، يرشدك الأمر إلى طريقة تثبيتها. اكتب ollama launch وحده لاختيار الأداة من قائمة.

عن هذا النموذج

الوصف الرسمي كما نشرته الجهة المطوِّرة، بلغته الأصلية.

OpenAI gpt-oss banner

Welcome OpenAI’s gpt-oss!

Ollama partners with OpenAI to bring its latest state-of-the-art open weight models to Ollama. The two models, 20B and 120B, bring a whole new local chat experience, and are designed for powerful reasoning, agentic tasks, and versatile developer use cases.

Get started

You can get started by downloading the latest Ollama version.

The model can be downloaded directly in Ollama’s new app or via the terminal:

ollama run gpt-oss:20b

ollama run gpt-oss:120b

Feature highlights

  • Agentic capabilities: Use the models’ native capabilities for function calling, web browsing (Ollama is introducing built-in web search that can be optionally enabled), python tool calls, and structured outputs.
  • Full chain-of-thought: Gain complete access to the model’s reasoning process, facilitating easier debugging and increased trust in outputs.
  • Configurable reasoning effort: Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs.
  • Fine-tunable: Fully customize models to your specific use case through parameter fine-tuning.
  • Permissive Apache 2.0 license: Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment.

benchmark

Quantization - MXFP4 format

OpenAI utilizes quantization to reduce the memory footprint of the gpt-oss models. The models are post-trained with quantization of the mixture-of-experts (MoE) weights to MXFP4 format, where the weights are quantized to 4.25 bits per parameter. The MoE weights are responsible for 90+% of the total parameter count, and quantizing these to MXFP4 enables the smaller model to run on systems with as little as 16GB memory, and the larger model to fit on a single 80GB GPU.

Ollama is supporting the MXFP4 format natively without additional quantizations or conversions. New kernels are developed for Ollama’s new engine to support the MXFP4 format.

Ollama collaborated with OpenAI to benchmark against their reference implementations to ensure Ollama’s implementations have the same quality.

20B parameter model

gpt-oss 20B

gpt-oss-20b model is designed for lower latency, local, or specialized use-cases.

120B parameter model

gpt-oss 120B

Reference

أسئلة شائعة عن تشغيل GPT-OSS 120B محليًا

هل أستطيع تشغيل GPT-OSS 120B على جهازي؟
يحتاج GPT-OSS 120B إلى 65.4 جيجابايت من الذاكرة كحد أدنى، والموصى به 109 جيجابايت. يكفي أن تفتح هذه الصفحة ليُقيَّم النموذج تلقائيًا أمام كرت شاشتك أو جهاز الماك، ثم تشغّله عبر Ollama أو LM Studio أو llama.cpp.
كم يحتاج GPT-OSS 120B من الـ VRAM؟
بتكميم Q4_K_M يستهلك GPT-OSS 120B نحو 60.4 جيجابايت من ذاكرة الكرت. أما المستويات الأعلى فتحتاج ذاكرة أكبر، والأدنى تناسب الكروت المحدودة مقابل تنازل في الجودة.