alt.freeweights.granite / granite-4.0-h-1b-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.graniteSubject:

granite-4.0-h-1b-ONNX

Date: 2026-11-15Commit: ca08f6fSigned: 2DC28CC7B26A283B ✓

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

granite12.6GBgranite-4.0-h-1b-ONNXonnxpermissive
FactsParamsnot statedSize12.6 GBFormatsonnxTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/granite-4.0-h-1b-ONNX
# manifest sha256 66e596b70d60… · 12.6 GB · 20 files
$ fw verify ./granite-4.0-h-1b-ONNX onnx-community/granite-4.0-h-1b-ONNX
From sourceHosted (signed)onnx-community/granite-4.0-h-1b-ONNXLast check: 2026-11-15 05:17 UTC

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

Quantized of granite-4.0-h-1b.

Works with

Runs with

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

Convert with

Overview

Size
12.6 GB
Weights
927 MB (smallest of 5 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
Apache-2.0 (permissive)
Files
20, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

Base model: ibm-granite/granite-4.0-h-1b

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:17 UTCpassed

Model card

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

Usage#

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

# 1. Setup
## Load config and tokenizer
model_id = "onnx-community/granite-4.0-h-1b-ONNX"
config = AutoConfig.from_pretrained(model_id) 
tokenizer = AutoTokenizer.from_pretrained(model_id)

## Load model
filename = "model" # Options: "model", "model_q4", "model_fp16", "model_q4f16"
dtype = np.float32 # or np.float16 if using fp16/q4f16
model_path = f"/path/to/model/onnx/{filename}.onnx"
decoder_session = onnxruntime.InferenceSession(model_path)
output_names = [o.name for o in decoder_session.get_outputs()]

## Initialize config values
num_key_value_heads = config.num_key_value_heads
head_dim = config.hidden_size // config.num_attention_heads
eos_token_id = config.eos_token_id
d_conv = config.mamba_d_conv
mamba_n_heads = config.mamba_n_heads
mamba_d_head = config.mamba_d_head
mamba_d_state = config.mamba_d_state
mamba_n_groups = config.mamba_n_groups
mamba_expand = config.mamba_expand
hidden_size = config.hidden_size
conv_d_inner = (mamba_expand * hidden_size) + (2 * mamba_n_groups * mamba_d_state)

# 2. Prepare inputs
## Define messages
messages = [
  { "role": "user", "content": "What is the capital of France?" },
]
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]
num_logits_to_keep = np.array(1, dtype=np.int64)

## Initialize cache
cache = {}
for i, layer_type in enumerate(config.layer_types):
  if layer_type == "attention":
    for kv in ('key', 'value'):
      cache[f'past_key_values.{i}.{kv}'] = np.zeros([batch_size, num_key_value_heads, 0, head_dim], dtype=dtype)
  elif layer_type == "mamba":
    cache[f'past_conv.{i}'] = np.zeros([batch_size, conv_d_inner, d_conv], dtype=dtype)
    cache[f'past_ssm.{i}'] = np.zeros([batch_size, mamba_n_heads, mamba_d_head, mamba_d_state], dtype=dtype)

# 3. Generation loop
max_new_tokens = 1024
generated_tokens = np.array([[]], dtype=np.int64)
for i in range(max_new_tokens):
  feed_dict = dict(
    input_ids=input_ids,
    attention_mask=attention_mask,
    num_logits_to_keep=num_logits_to_keep,
  )
  outputs = decoder_session.run(None, feed_dict | cache)
  named_outputs = dict(zip(output_names, outputs))

  ## Update values for next generation loop
  input_ids = outputs[0][:, -1].argmax(-1, keepdims=True)
  attention_mask = np.concatenate([attention_mask, np.ones_like(input_ids, dtype=np.int64)], axis=-1)
  
  for name in cache:
    new_name = name.replace('past_key_values', 'present').replace('past_', 'present_')
    cache[name] = named_outputs[new_name]

  generated_tokens = np.concatenate([generated_tokens, input_ids], axis=-1)
  if (input_ids == eos_token_id).all():
    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

20 files · 12.6 GBWeights 927 MB (smallest of 5 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 20 files with their sha256
FileSizesha256
.gitattributes2.01 KB337f9d531488c00c707fc683dbdf7bfcb2347ed30b50ff007271fe7276ec0d9f
README.md3.17 KBbe35fac5cca1333250518b20330453eae7c0a88e865d9b49376c79f0c514899a
chat_template.jinja6.42 KB9524df67b77a7b25a2dfee898f75b316a157eb9d855b51e32aeac79d7c8a83ce
config.json2.27 KBd2d411d9b0c62dc1671e224383ebde387dfb2ced76b121fbe80508b10243f99d
generation_config.json146 B5b2e6464e8e8765cee1a5e00dba0577b6e26eb1f424173e2c83d5ecb126e6446
onnx/model.onnx2.27 MB1220b7345d7ae8b61525d225d5b98d91f492a7a219ce0a475cd6d2e17d3efa6a
onnx/model.onnx_data2.06 GBb51e4b0b3061afd07bfdd83d1cee391342c5e4a5ca2d21837c8c65d49c932195
onnx/model.onnx_data_12.08 GB7b7abd32c0873afd42256083342ef8e31b38cb2f86079e5f538d5c0d6452cd44
onnx/model.onnx_data_21.71 GB7d78ff9d9ef55114c54b6a9c00aae47bb4e7a2a76ea84a97eb9fa991ee2f6c02
onnx/model_fp16.onnx2.34 MBf456ae4238148f8ded030f2c575d2f6a5891654fd00a132085123da2dc58a2cc
onnx/model_fp16.onnx_data2.09 GBbba37a58368087705e80d8a388c8a331d8389b4e7a13a0dc2f1d568a6045d505
onnx/model_fp16.onnx_data_1835 MBe46b2bdebe9b423e258ed508f6e1119c0a96742634e4aa184f2479f13ba5db12
onnx/model_q4.onnx2.37 MB3a5ac8d165da45e2a91e651140354204a34c6aa6f0d038f13d48e5cb71d6e911
onnx/model_q4.onnx_data1.02 GB70b0f0ed663b8832edf69cb21598368a198dbec54104748abe1ec1c1645ddfae
onnx/model_q4f16.onnx2.44 MB7dce8e43fe54f0960e06a90fcf688cae390cd8732f279ffc7ea28a0e1fc69706
onnx/model_q4f16.onnx_data925 MB43768f64de6732c5fc305d6f24251a01351e08bf5bf8fc2608e91f1299558d52
onnx/model_quantized.onnx2.38 MB90865d153e7155e22e1a30a043837ed4ec9ed81ba6e20961a072c956d35a83c6
onnx/model_quantized.onnx_data1.85 GB60eb760726cc23a98344f810187cae87a121f25a2d6183d4c2601718f4b208cc
tokenizer.json4.13 MB7fb9ae9d95bdfc384ca52a54c918f78975c4082684fd510f54dcc9718ad1d026
tokenizer_config.json7.47 KBf395459029b54b0e623898c7b0817c7224d1e483b6a163a2cd2b2ac75a03015e
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
ca08f6f525 pinned now2026-11-15 05:17 UTC20 files · 12.6 GB

Use it

$ fw get onnx-community/granite-4.0-h-1b-ONNX
# manifest sha256 66e596b70d60… · 12.6 GB · 20 files
$ fw verify ./granite-4.0-h-1b-ONNX onnx-community/granite-4.0-h-1b-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/granite-4.0-h-1b-ONNX.json --dir ./granite-4.0-h-1b-ONNX $ python3 fw.py verify ./granite-4.0-h-1b-ONNX ./onnx-community__granite-4.0-h-1b-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/granite-4.0-h-1b-ONNX --revision ca08f6f525ee61e1f75fd9b2686464eea0a713ce --local-dir ./granite-4.0-h-1b-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
be35fac5cca1333250518b20330453eae7c0a88e865d9b49376c79f0c514899a
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.graniteSubject: granite-4.0-h-1b-ONNXDate: 2026-11-15Commit: ca08f6fSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/granite-4.0-h-1b-ONNX
Pinned commit
ca08f6f525ee61e1f75fd9b2686464eea0a713ce
Manifest
granite-4.0-h-1b-ONNX.json · .minisig
Manifest sha256
66e596b70d606eee6aa6beb924f8afa2aa0857e09e93376b1bedaf7a9f782aa7
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:17 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/granite-4.0-h-1b-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/granite-4.0-h-1b-ONNX.json.minisig $ minisign -Vm granite-4.0-h-1b-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

ibm-granite/granite-4.0-h-1b · 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/granite-4.0-h-1b-ONNX
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. granite-4.0-h-1b-ONNX.json. Provenance. Takedown history: none.
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed3
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed3