Downloads · 30 days
8
2% of all-time downloads
zeromodels/gpt-oss-20b
gpt-oss-20b is a text generation model from zeromodels. Use it when you need the model to write or continue text. It is set up for zeromodels. The card lists the license as apache-2.0.
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/gptoss/)
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
404
Public
Repo size
13.8 GB
Likes
0
Public
Click a slice to open those files.
.h513.8 GB · 100%
From the Hugging Face model README
GPT-OSS is OpenAI's open-weight mixture-of-experts LLM family: top-k routed experts, learned per-head attention sinks, alternating sliding-window / full causal attention, and YaRN-scaled rotary positions. The experts ship in MXFP4 (4-bit), which is why the checkpoint is compact.
For more details on the model, please see OpenAI's original model card.
Pure-Keras 3 conversion of openai/gpt-oss-20b
for zeromodels. One implementation runs unmodified on
TensorFlow / Torch / JAX. The MoE experts are stored in MXFP4 exactly as
OpenAI ships them (uint8 nibble blocks + e8m0 scales), matching the official
footprint and dequantized on the fly at run time on every backend (including CPU).
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from zeromodels.models.gpt_oss import GptOssTextGenerate, GptOssTokenizer
model = GptOssTextGenerate.from_weights("zeromodels/gpt-oss-20b")
tokenizer = GptOssTokenizer.from_weights("zeromodels/gpt-oss-20b")
inputs = tokenizer([
{"role": "user", "content": "Explain rotary embeddings in one sentence."}
])
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0]))
Load any GPT-OSS variant the same way with from_weights("zeromodels/<variant>"):
| Variant | Hub | Weights |
|---|---|---|
gpt-oss-20b | zeromodels/gpt-oss-20b | MXFP4 MoE |
gpt-oss-120b | zeromodels/gpt-oss-120b | MXFP4 MoE |
KERAS_BACKEND before importing Keras / zeromodels.hf: prefix, e.g.
GptOssTextGenerate.from_weights("hf:openai/gpt-oss-20b").A huge thank you to the OpenAI GPT-OSS authors for creating and releasing these models under Apache 2.0.
License: Apache 2.0.