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

granite-4.0-h-micro-ONNX

Date: 2026-11-15Commit: 91af30eSigned: 2DC28CC7B26A283B ✓

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

granite27.2GBgranite-4.0-h-micro-ONNXonnxpermissive
FactsParamsnot statedSize27.2 GBFormatsonnxTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/granite-4.0-h-micro-ONNX
# manifest sha256 7fa22fa6d2a0… · 27.2 GB · 28 files
$ fw verify ./granite-4.0-h-micro-ONNX onnx-community/granite-4.0-h-micro-ONNX
From sourceHosted (signed)onnx-community/granite-4.0-h-micro-ONNXLast check: 2026-11-15 05:22 UTC

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

Quantized of granite-4.0-h-micro.

Works with

Runs with

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

Convert with

Overview

Size
27.2 GB
Weights
1.95 GB (smallest of 5 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
Apache-2.0 (permissive)
Files
28, 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-micro

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

Model card

From the publisher at commit 91af30e. 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-micro-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

28 files · 27.2 GBWeights 1.95 GB (smallest of 5 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 28 files with their sha256
FileSizesha256
.gitattributes2.57 KBfb1f371ee04dfd87e75139d073c13702259222463b9ddf3f6252cd1bc81327e2
README.md3.18 KB2e85ded019ce82fe8a1ac342c2ca2058069991401409b175fa0c11729d7c1a24
chat_template.jinja6.42 KB9524df67b77a7b25a2dfee898f75b316a157eb9d855b51e32aeac79d7c8a83ce
config.json2.24 KB0e2b7a2ffc50ac7bc45187aaf2616b631084671b3ef88145d52969eed57c8c71
generation_config.json146 B5b2e6464e8e8765cee1a5e00dba0577b6e26eb1f424173e2c83d5ecb126e6446
onnx/model.onnx2.28 MB5d02e658bbb6cf17c1cdf88954e92019421b22776896e7a281d4761e8da43f69
onnx/model.onnx_data2.04 GBd7549332c3638c2554ea2673a7a36ff059d1306c115312d0f4df0384528a079d
onnx/model.onnx_data_12.07 GB008265caa5b01c62b9d6b08f58d5742b34204f3cdd6fcb6b1fb71708f92c4054
onnx/model.onnx_data_22.07 GB8dbd5bcc6abeda44829d4be81b009fdfc508f5a5ad0e5e8592b30ce4086b3618
onnx/model.onnx_data_32.07 GBa66080e48fea6e2787418dfffacaba8fddc66e90b0f4090670a5a480b703b8eb
onnx/model.onnx_data_42.07 GB28df0fc4c43360afbd5f6a2b8e761231b41058f8f34a5c0f708ebfb717429925
onnx/model.onnx_data_52.07 GBa284d06bb164a0352f3a212bfc01f5f6463c7d75f3d261dfa87869dfc0058242
onnx/model.onnx_data_6372 MBf22024e0f1706b61ec8a4840f59e5cb49d65a06be5aa840dc0084a19b88d8830
onnx/model_fp16.onnx2.34 MB3af3b899ff65e0373859805288faae6676e7e8c7899040d115b51fb54374c5fa
onnx/model_fp16.onnx_data2.09 GB112a5b8fdf751f14030b8bf728313cfb5cea9d8730df84bdaf69e8e9035a6849
onnx/model_fp16.onnx_data_12.09 GB76fbe9c77d512c56a034ff260d825d2f19363440fbd9289a934b902696c091bb
onnx/model_fp16.onnx_data_22.09 GB47706156a108d2b93e5384c7810b61a8e76270b4bdbefb3982125aeb65b25327
onnx/model_fp16.onnx_data_3117 MB341a09821050768095f60e5ef0e4f285c0a694a6a7b76cf8aa2ddcd24e8e2c09
onnx/model_q4.onnx2.38 MBb55f212765a1d4fc6601a5683a183cc10b61fc5f2b82f353d6e52ed5bccd09ca
onnx/model_q4.onnx_data2.05 GBcc5ca4b8a74a585ccf40df55ffbeccf650c18cb82e0deb4895f82899f6809dd6
onnx/model_q4.onnx_data_1103 MBa77a851e5d054857257d641c651659bd85fdd93376fb55a6a61b92b5a85ea99e
onnx/model_q4f16.onnx2.45 MBfdc97bc19b3f2a3b0c2b64978b87473c18683b3962921b63852a6ae657fdc0fa
onnx/model_q4f16.onnx_data1.95 GB60fbcc5e9f4ea7e674b8d0f79dc0e64da33a8d22008c8fe980df5c6fcb07f80d
onnx/model_quantized.onnx2.39 MB6f477ff26045eede47d4e43819d924c3cb38575fa5cb2ca87f087e1b17a20ccf
onnx/model_quantized.onnx_data2.09 GBe896476ecd4c74bb2d2eafa89eefe22d833533f7c93a669d6f085e6ba5788a3d
onnx/model_quantized.onnx_data_11.81 GBd6945078d5b2e569c570d627c1320b27b71ce333d4691cae8fff39109c955298
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
91af30efc0 pinned now2026-11-15 05:22 UTC28 files · 27.2 GB

Use it

$ fw get onnx-community/granite-4.0-h-micro-ONNX
# manifest sha256 7fa22fa6d2a0… · 27.2 GB · 28 files
$ fw verify ./granite-4.0-h-micro-ONNX onnx-community/granite-4.0-h-micro-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-micro-ONNX.json --dir ./granite-4.0-h-micro-ONNX $ python3 fw.py verify ./granite-4.0-h-micro-ONNX ./onnx-community__granite-4.0-h-micro-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-micro-ONNX --revision 91af30efc045523355c81fef6224e11c280211b0 --local-dir ./granite-4.0-h-micro-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
2e85ded019ce82fe8a1ac342c2ca2058069991401409b175fa0c11729d7c1a24
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-micro-ONNXDate: 2026-11-15Commit: 91af30eSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/granite-4.0-h-micro-ONNX
Pinned commit
91af30efc045523355c81fef6224e11c280211b0
Manifest
granite-4.0-h-micro-ONNX.json · .minisig
Manifest sha256
7fa22fa6d2a0bad107acd5812e149885ed4f37112c5c65cc7bab3073406ec4a6
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:22 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-micro-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/granite-4.0-h-micro-ONNX.json.minisig $ minisign -Vm granite-4.0-h-micro-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-micro · 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-micro-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-micro-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