alt.freeweights.gpt-oss / gpt-oss-20b-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.gpt-ossSubject:

gpt-oss-20b-ONNX

Date: 2026-11-15Commit: 0cb2c91Signed: 2DC28CC7B26A283B ✓

Text generation model. Onnx weights, 12.7 GB in all. Published by onnx-community under Apache-2.0.

gpt-oss12.7GBgpt-oss-20b-ONNXonnxpermissive
FactsParamsnot statedSize12.7 GBFormatsonnxTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/gpt-oss-20b-ONNX
# manifest sha256 250f52a928b3… · 12.7 GB · 17 files
$ fw verify ./gpt-oss-20b-ONNX onnx-community/gpt-oss-20b-ONNX
From sourceHosted (signed)onnx-community/gpt-oss-20b-ONNXLast check: 2026-11-15 05:20 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of gpt-oss-20b.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Overview

Size
12.7 GB
Weights
2.13 GB (ONNX)
Parameters
not stated
Formats
onnx
Task
text generation
License
Apache-2.0 (permissive)
Files
17, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.gpt-oss
Lineage

Original release from the publisher.

Base model: openai/gpt-oss-20b

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:20 UTCpassed

Model card

From the publisher at commit 0cb2c91. Shown as plain text with links; images open at the publisher.

ONNX flavor of https://huggingface.co/openai/gpt-oss-20b.

The ONNX model using int4 quantization.

When pinning embeddings to CPU it will run well on 12GB gpus.

Usage#

ONNXRuntime#
from transformers import AutoConfig, AutoTokenizer, GenerationConfig
import onnxruntime
import numpy as np

# 1. Load config, processor, and model
model_id = "onnx-community/gpt-oss-20b-ONNX"
config = AutoConfig.from_pretrained(model_id)
generation_config = GenerationConfig.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model_path = "/path/to/onnx/model_q4f16.onnx" # NB: Add .onnx_data* files to the same directory as the model file
decoder_session = onnxruntime.InferenceSession(model_path, providers=['WebGpuExecutionProvider'])

## Set config values
num_key_value_heads = config.num_key_value_heads
head_dim = config.head_dim
num_hidden_layers = config.num_hidden_layers
eos_token_id = generation_config.eos_token_id

# 2. Prepare inputs
messages = [
  { "role": "user", "content": "Write me a poem about Machine Learning." },
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="np")
input_ids = inputs['input_ids']
attention_mask = inputs['attention_mask']
batch_size = input_ids.shape[0]
past_key_values = {
    f'past_key_values.{layer}.{kv}': np.zeros([batch_size, num_key_value_heads, 0, head_dim], dtype=np.float16)
    for layer in range(num_hidden_layers)
    for kv in ('key', 'value')
}

# 3. Generation loop
max_new_tokens = 1024
generated_tokens = np.array([[]], dtype=np.int64)
for i in range(max_new_tokens):
  logits, *present_key_values = decoder_session.run(None, dict(
      input_ids=input_ids,
      attention_mask=attention_mask,
      **past_key_values,
  ))

  ## Update values for next generation loop
  input_ids = logits[:, -1].argmax(-1, keepdims=True)
  attention_mask = np.concatenate([attention_mask, np.ones_like(input_ids, dtype=np.int64)], axis=-1)
  for j, key in enumerate(past_key_values):
    past_key_values[key] = present_key_values[j]

  generated_tokens = np.concatenate([generated_tokens, input_ids], axis=-1)
  if np.isin(input_ids, eos_token_id).any():
    break

  ## (Optional) Streaming
  print(tokenizer.decode(input_ids[0]), end='', flush=True)
print()

# 4. Output result
print(tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0])

Files

17 files · 12.7 GBWeights 2.13 GB (ONNX). Sizes and sha256 from the signed manifest.
Hide all 17 files with their sha256
FileSizesha256
.gitattributes2.02 KB63662798367e4c9e910b5d3f301e96df5efe3c977eb9b01817602bd89db8b99d
README.md2.50 KB1eff3b16d227da945cf942b5d1f3a2cd9c32a8752377127db830d9d2f8ad261f
chat_template.jinja16.5 KBf1c729996bbc0a5fce29a58b5f55d122ead5af96d3f56e4431f4a895cde556fc
config.json2.10 KBdc54cf872c059cb8f510f38770176b29211d1d83a9bebb7de0d759fe77d80948
genai_config.json1.72 KB063db3c8fe0866ef7dbce5966de6e6cc8f0df38ba5b911764f9d8ddaca9bc3c5
generation_config.json175 B912bb474f36eb600f91a5a32f70f5dd2534313423adfc3d6726cb123e3b1de9d
onnx/model_q4f16.onnx55.2 MB5834cda2698332a02b1451a2935d10e7484b871bfa30c3a8b62cb72cc74e6a83
onnx/model_q4f16.onnx_data2.07 GB2fb5a8564a09f6521e51b06f29384439b1285ccf9166533fceb4ed6af206aa7a
onnx/model_q4f16.onnx_data_12.06 GB0d3370b50d98413348135365c925b6af46346171693041c115d96f79c3f4fe21
onnx/model_q4f16.onnx_data_21.97 GBff26e086a3887371ac51a89aeac752cbe2dce20cec514a2190d54287d302b4d4
onnx/model_q4f16.onnx_data_32.06 GBd4c49f1cb2f941bc5d457546c0b35707b518e0401d4dd9716238f45b7d6ef235
onnx/model_q4f16.onnx_data_41.97 GB3619260fcfd26b367cd886f1d21a24332f111ded159ca388b7e0d8f1026b414e
onnx/model_q4f16.onnx_data_52.10 GB4848013f1019367d427e5802c58b0adeb4f5cae31e1ff639fa39f9e70ef6660c
onnx/model_q4f16.onnx_data_6339 MB74f352935e9af66748ad0afe803aee88f94735865ac3a6ff3f3380885fb1c18c
special_tokens_map.json463 B9ee667e324910c037718c9251f2ec97cec5530b6789a52a4d95328e61f110512
tokenizer.json27.9 MB0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
tokenizer_config.json21.9 KB340123c6e8ddb2261890ce879fe351d9cde7c9e458c7baee221454fa232dd2cb
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
0cb2c91096 pinned now2026-11-15 05:20 UTC17 files · 12.7 GB

Use it

$ fw get onnx-community/gpt-oss-20b-ONNX
# manifest sha256 250f52a928b3… · 12.7 GB · 17 files
$ fw verify ./gpt-oss-20b-ONNX onnx-community/gpt-oss-20b-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/gpt-oss-20b-ONNX.json --dir ./gpt-oss-20b-ONNX $ python3 fw.py verify ./gpt-oss-20b-ONNX ./onnx-community__gpt-oss-20b-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/gpt-oss-20b-ONNX --revision 0cb2c910963421423a6011d51dd0fef9d6e99f36 --local-dir ./gpt-oss-20b-ONNX

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
1eff3b16d227da945cf942b5d1f3a2cd9c32a8752377127db830d9d2f8ad261f
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.gpt-ossSubject: gpt-oss-20b-ONNXDate: 2026-11-15Commit: 0cb2c91Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/gpt-oss-20b-ONNX
Pinned commit
0cb2c910963421423a6011d51dd0fef9d6e99f36
Manifest
gpt-oss-20b-ONNX.json · .minisig
Manifest sha256
250f52a928b3791f28a0a55f6f1579773d5d4a3fbb9a2327fa79de943d81f373
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:20 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/gpt-oss-20b-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/gpt-oss-20b-ONNX.json.minisig $ minisign -Vm gpt-oss-20b-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

openai/gpt-oss-20b · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/gpt-oss-20b-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. gpt-oss-20b-ONNX.json. Provenance. Takedown history: none.
From: unsloth <huggingface.co/unsloth>Subject: gpt-oss-120b
From: mlx-community <huggingface.co/mlx-community>Subject: gpt-oss-120b-4bit
From: unsloth <huggingface.co/unsloth>Subject: gpt-oss-120b-BF16
From: lmstudio-community <huggingface.co/lmstudio-community>Subject: gpt-oss-120b-GGUF
From: unsloth <huggingface.co/unsloth>Subject: gpt-oss-120b-GGUF
From: lmstudio-community <huggingface.co/lmstudio-community>Subject: gpt-oss-120b-MLX-8bit