gpt-oss
Collection
OpenAI's gpt-oss-20b and gpt-oss-120b β’ 2 items β’ Updated
How to use bobchenyx/gpt-oss-120b-GGUF with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="bobchenyx/gpt-oss-120b-GGUF") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("bobchenyx/gpt-oss-120b-GGUF", device_map="auto")How to use bobchenyx/gpt-oss-120b-GGUF with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE # Run inference directly in the terminal: llama cli -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE # Run inference directly in the terminal: llama cli -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE # Run inference directly in the terminal: ./build/bin/llama cli -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
docker model run hf.co/bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
How to use bobchenyx/gpt-oss-120b-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "bobchenyx/gpt-oss-120b-GGUF"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bobchenyx/gpt-oss-120b-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
How to use bobchenyx/gpt-oss-120b-GGUF with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "bobchenyx/gpt-oss-120b-GGUF" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bobchenyx/gpt-oss-120b-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "bobchenyx/gpt-oss-120b-GGUF" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bobchenyx/gpt-oss-120b-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use bobchenyx/gpt-oss-120b-GGUF with Ollama:
ollama run hf.co/bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
How to use bobchenyx/gpt-oss-120b-GGUF with Pi:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
# Install Pi:
npm install -g @earendil-works/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
"providers": {
"llama-cpp": {
"baseUrl": "http://localhost:9931/v1",
"api": "openai-completions",
"apiKey": "none",
"models": [
{
"id": "bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE"
}
]
}
}
}# Start Pi in your project directory: pi
How to use bobchenyx/gpt-oss-120b-GGUF with Docker Model Runner:
docker model run hf.co/bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
How to use bobchenyx/gpt-oss-120b-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
lemonade run user.gpt-oss-120b-GGUF-MXFP4_MOE
lemonade list
How to use bobchenyx/gpt-oss-120b-GGUF with Hermes Agent:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
# 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:9931/v1 hermes config set model.default bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
hermes
How to use bobchenyx/gpt-oss-120b-GGUF with OpenClaw:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE
# 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:9931/v1 \ --custom-model-id "bobchenyx/gpt-oss-120b-GGUF:MXFP4_MOE" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
openclaw agent --local --agent main --message "Hello from Hugging Face"
Original model: Adopting F16 from unsloth/gpt-oss-120b-GGUF.
MXFP4_MOE quant made with update in this PR llama.cpp #15091
MXFP4_MOE : 59.02 GiB (4.34 BPW)
# !pip install huggingface_hub hf_transfer
import os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
from huggingface_hub import snapshot_download
snapshot_download(
repo_id = "bobchenyx/gpt-oss-120b-GGUF",
local_dir = "bobchenyx/gpt-oss-120b-GGUF",
allow_patterns = ["*MXFP4_MOE*"],
)
4-bit
Base model
openai/gpt-oss-120b