gpt-oss-20b · GGUF (MXFP4)
GGUF build of openai/gpt-oss-20b for llama.cpp / Ollama / LM Studio. Converted by axteam with llama.cpp. The chat template (OpenAI harmony format) is embedded in the GGUF.
| File | Quant | Size | Notes |
|---|---|---|---|
gpt-oss-20b-GGUF-MXFP4.gguf |
MXFP4 | 13.8 GB | native 4-bit MoE weights (as released by OpenAI) |
gpt-oss-20b is natively MXFP4 — the expert weights ship in 4-bit, so this single file is the faithful, full-quality build (no separate Q4/Q8 needed). OpenAI states gpt-oss-20b runs within 16 GB of memory; it was run here on an NVIDIA B200 (2026-11-02, see Requirements). Architecture: gpt-oss · Mixture-of-Experts (~21B total, ~3.6B active). 128k context, adjustable reasoning effort.
Quantization method
No quantization was done in this repo. OpenAI's original card states that the models were post-trained with MXFP4 quantization of the MoE weights, so the 4-bit expert weights come from OpenAI's own training, not from a separate post-training quantization (PTQ) step. llama.cpp copies those MXFP4 expert weights into GGUF as-is, with no re-quantization and no retraining by axteam. The attention, token-embedding and output weights stay BF16 as in the original; norms, biases and the router are stored as F32. The precision matches OpenAI's original release. No quality figure is published for this file: there is no other build to compare it with, and its plain-text perplexity (measured on 2026-11-02) is not a meaningful quality measure for this harmony chat-format model.
Requirements
| llama.cpp | build ≥ b6325 — architecture gpt-oss needs ≥ b6096, and the commands on this card use -fa on (≥ b6325). Run here on 2026-11-02 with b12005 (commit e0f142d, CUDA build) on an NVIDIA B200: the file loaded with all layers on the GPU and answered two short chat questions (capital of France / of Korea) correctly (“Paris”, “서울”). |
| Memory | the chosen GGUF file (sizes in the table) plus KV cache for the context (-c); --cache-type-k/v q8_0 -fa on halves the KV cache. |
| Input | text. |
| Ollama / LM Studio | not tested here. |
Run with llama.cpp
Use a recent llama.cpp build (gpt-oss support, Aug-2025 or later).
# chat server (harmony template is embedded; --jinja uses it)
llama-server -m gpt-oss-20b-GGUF-MXFP4.gguf -c 8192 --jinja
# single answer and exit (-st)
llama-cli -m gpt-oss-20b-GGUF-MXFP4.gguf --jinja -p "Explain MoE in one sentence." -st
Reasoning effort can be set in the system prompt (Reasoning: low|medium|high).
Reduce KV-cache memory (optional, run-time)
KV-cache type is a run-time choice in llama.cpp (not baked into the file):
llama-server -m gpt-oss-20b-GGUF-MXFP4.gguf -c 8192 --jinja \
--cache-type-k q8_0 --cache-type-v q8_0 -fa on
Ollama
ollama run hf.co/axteam/gpt-oss-20b-GGUF
License
Apache-2.0, following the original openai/gpt-oss-20b. Weights, tokenizer, and chat template belong to OpenAI. This repo only re-packages them as GGUF.
한국어 요약
openai/gpt-oss-20b의 GGUF 변환 빌드 (llama.cpp·Ollama·LM Studio용) · 제작 axteam
개요
| 항목 | 내용 |
|---|---|
| 원본 모델 | openai/gpt-oss-20b |
| 형식 | GGUF (llama.cpp) |
| 변환 도구 | llama.cpp convert_hf_to_gguf.py (OpenAI 원본 MXFP4 가중치를 그대로 옮김, llama-quantize 미사용) |
| 모델 구조 | MoE (총 약 21B 중 약 3.6B 활성) · 컨텍스트 128k |
| 파일 수 | 1개 |
양자화 상세
- 양자화 절차: 이 리포에서 새로 양자화하지 않음 — OpenAI 원본 카드 기준 MoE 전문가 가중치는 MXFP4로 양자화한 상태로 사후 학습(post-training)됨, llama.cpp가 그 MXFP4 가중치를 재양자화·재학습 없이 GGUF로 옮김 (어텐션·임베딩·출력 가중치는 원본처럼 BF16, 정규화층·bias·라우터는 F32로 저장)
- chat template: GGUF 파일에 내장 (OpenAI harmony 형식,
--jinja로 사용) - 품질: 수치 미기재 — 비교할 다른 파일이 없고, 2026-11-02에 측정한 일반 텍스트 PPL은 harmony 채팅 형식 모델이라 품질 지표로 의미가 없어 싣지 않음 · 재양자화 없이 OpenAI 배포본과 같은 정밀도
제공 파일
| 파일 | 크기 | 설명 |
|---|---|---|
gpt-oss-20b-GGUF-MXFP4.gguf |
13.8 GB | OpenAI가 배포한 그대로의 4비트 MoE 가중치 |
요구사항
- llama.cpp: b6325 이상 (
gpt-oss구조 지원 b6096부터, 예시 명령의-fa on옵션 b6325부터) - 실행 확인: 2026-11-02 b12005(커밋 e0f142d) CUDA 빌드로 NVIDIA B200에서 전 층을 GPU에 올려 실행 — 짧은 질문 2개(프랑스·대한민국 수도)에 바르게 답함(“Paris”, “서울”)
- 메모리: 파일 13.8 GB + 컨텍스트 길이(
-c)에 비례하는 KV 캐시 — OpenAI 안내 기준 16 GB 메모리에서 실행 가능 (여기서는 B200에서만 실행 — 16 GB 메모리 실행은 미확인, KV 캐시를 줄이는 방법은 아래 사용법 참고) - 입력: 텍스트
- Ollama·LM Studio: 제작 측에서 실행 미확인
사용법
- 파일 받기:
hf download axteam/gpt-oss-20b-GGUF gpt-oss-20b-GGUF-MXFP4.gguf --local-dir .(아래-m명령에 필요) - 서버 실행:
llama-server -m gpt-oss-20b-GGUF-MXFP4.gguf -c 8192 --jinja - 한 번 질문 (답변 후 종료):
llama-cli -m gpt-oss-20b-GGUF-MXFP4.gguf --jinja -p "Explain MoE in one sentence." -st - 추론 강도: 시스템 프롬프트에
Reasoning: low|medium|high지정 - Ollama:
ollama run hf.co/axteam/gpt-oss-20b-GGUF - KV 캐시 절감(선택):
--cache-type-k q8_0 --cache-type-v q8_0 -fa on— KV 캐시 약 절반, GGUF 파일과 상관없이 실행 시 지정
라이선스
- 라이선스: Apache-2.0 — 원본 모델의 라이선스를 그대로 따름
- 권리: 원본 가중치·토크나이저·chat template은 OpenAI 소유, 이 리포는 GGUF로 다시 묶은 것