alt.freeweights.granite / granite-4.2-8b-q8-mlx
From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject:

granite-4.2-8b-q8-mlx

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

Model. Safetensors weights, 9.35 GB in all. Published by ibm-granite under Apache-2.0.

granite9.35GBgranite-4.2-8b-q8-mlxsafetensorspermissive
FactsParamsnot statedSize9.35 GBFormatssafetensorsTasknot taggedLicenseApache-2.0From sourcepermissive
$ fw get ibm-granite/granite-4.2-8b-q8-mlx
# manifest sha256 be70e4e8427e… · 9.35 GB · 10 files
$ fw verify ./granite-4.2-8b-q8-mlx ibm-granite/granite-4.2-8b-q8-mlx
From sourceHosted (signed)ibm-granite/granite-4.2-8b-q8-mlxLast check: 2026-11-15 05:09 UTC

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

Quantized of granite-4.2-8b.

Works with

Runs with

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

Overview

Size
9.35 GB
Weights
9.34 GB (safetensors)
Parameters
not stated
Formats
safetensors
Task
not tagged
License
Apache-2.0 (permissive)
Files
10, each with a sha256
Publisher
ibm-granite
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

Base model: ibm-granite/granite-4.2-8b

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

Model card

From the publisher at commit a60999a. Shown as plain text with links; images open at the publisher.
Granite 4.2 models (MLX)#

Granite 4.2 language models are a family of state-of-the-art open foundation models featuring dense decoder-only architectures. They natively support multilingual capabilities, a wide range of coding tasks, retrieval-augmented generation (RAG), tool usage, structured JSON output, and extended reasoning via a built-in thinking mode.

All models are publicly released under the Apache 2.0 license, allowing free use for both research and commercial purposes. The data curation and training processes were specifically designed for enterprise scenarios and customization, incorporating governance, risk, and compliance (GRC) evaluations alongside IBM's standard data clearance and document quality review procedures.

Note. This repository contains MLX variants of an IBM Granite base model, converted using mlx-lm for native inference on Apple Silicon (M-series) hardware.

Please reference the base model's full model card here: https://huggingface.co/ibm-granite/granite-4.2-8b

Requirements#
  • macOS with Apple Silicon (M1 / M2 / M3 / M4 or later)
  • Python ≥ 3.9
Installation#

mlx-lm is a Python package that provides fast LLM inference and fine-tuning on Apple Silicon using the MLX framework.

Option 1 — install into your environment (recommended for repeated use):

pip install mlx-lm

Option 2 — run ephemerally via uvx (no persistent mlx-lm install required):

Prerequisite: uvx is part of uv, a fast Python package manager. Install it first by following the uv installation guide or with:

pip install uv
# mlx-lm is downloaded into a temporary environment on first use
uvx mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "Why is the sky blue according to science?" \
  --temp 1.0 \
  --top-p 0.95
Available MLX Variants#

Each quantization variant is published as its own Hugging Face repository:

VariantRepo name suffixDescriptionRecommended for
bf16-bf16-mlxFull-precision BFloat16Highest quality; requires ≥ 16 GB unified memory
q8-q8-mlx8-bit quantization (group-size 64)High quality with ~50 % memory reduction vs bf16
q4-q4-mlx4-bit quantization (group-size 64)Best efficiency; suitable for 8 GB unified memory

For example, the variants for granite-4.2-8b are published at:

ibm-granite/granite-4.2-8b-bf16-mlx
ibm-granite/granite-4.2-8b-q8-mlx
ibm-granite/granite-4.2-8b-q4-mlx
Running#

Run directly from a variant repository (mlx-lm will download weights on first use):

mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "Why is the sky blue according to science?" \
  --temp 1.0 \
  --top-p 0.95

To use a different quantization, substitute the variant suffix, for example -q8-mlx or -bf16-mlx.

You can also download the model and run from a local path:

uvx --from huggingface-hub hf download ibm-granite/granite-4.2-8b-q8-mlx \
  --local-dir ./granite-4.2-8b-q8-mlx

mlx_lm generate \
  --model ./granite-4.2-8b-q8-mlx \
  --prompt "Why is the sky blue according to science?" \
  --temp 1.0 \
  --top-p 0.95

This repository includes a generation_config.json copied from the base model. It records the recommended temperature and top_p values, but mlx_lm generate does not read them automatically — only eos_token_id is consumed by mlx-lm at inference time. Pass the values explicitly on every invocation using the flags below.

The Granite 4.2 base model recommends:

ParameterRecommended valueCLI flag
Temperature1.0--temp 1.0
Top-p0.95--top-p 0.95

Without these flags, mlx_lm generate defaults to --temp 0.0 (greedy / deterministic decoding) and --top-p 1.0.

Example with the recommended values applied:

mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "Explain retrieval-augmented generation in simple terms." \
  --temp 1.0 \
  --top-p 0.95

In Python, always apply the chat template and pre-tokenize before calling generate():

from mlx_lm import load, generate

model, tokenizer = load("ibm-granite/granite-4.2-8b-q8-mlx")

messages = [{"role": "user", "content": "Explain retrieval-augmented generation in simple terms."}]

# Always pre-tokenize with add_special_tokens=False — see Thinking Mode section.
prompt_str = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=True,
)
prompt = tokenizer.encode(prompt_str, add_special_tokens=False)

response = generate(model, tokenizer, prompt=prompt, temp=1.0, top_p=0.95, max_tokens=256)
print(response)
Thinking Mode#

Granite 4.2 supports built-in chain-of-thought reasoning. When thinking is active the model produces its reasoning inside a <think>…</think> block before its final answer.

Thinking is on by default. The chat template appends <think>\n automatically when add_generation_prompt=True, placing the model inside the open reasoning block so it generates content before closing it. Two template parameters let you adjust the behavior:

ParameterValuesEffect
enable_thinkingtrue (default) / falseEnables or disables the <think> block entirely.
reasoning_effort"low" / "high" (default)"low" requests a shorter reasoning pass; omit or set "high" for full depth.

CLI — thinking is on by default

No extra flags are needed to enable thinking. The model reasons automatically:

mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "What is the difference between a mutex and a semaphore?" \
  --temp 1.0 \
  --top-p 0.95 \
  --max-tokens 1024

CLI — disable thinking for direct answers:

Pass enable_thinking=false via --chat-template-config to skip the reasoning block entirely:

mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "Summarize this paragraph in one sentence." \
  --chat-template-config '{"enable_thinking": false}' \
  --temp 1.0 \
  --top-p 0.95

CLI — request low-effort (faster) reasoning:

mlx_lm generate \
  --model ibm-granite/granite-4.2-8b-q8-mlx \
  --prompt "What is the difference between a mutex and a semaphore?" \
  --chat-template-config '{"reasoning_effort": "low"}' \
  --temp 1.0 \
  --top-p 0.95 \
  --max-tokens 1024
Python API#

Enable thinking:

Include <think> block before answer:

from mlx_lm import load, generate

model, tokenizer = load(
    "ibm-granite/granite-4.2-8b-q8-mlx"
)

messages = [{"role": "user", "content": "What is the difference between a mutex and a semaphore?"}]

# enable_thinking=True: the chat template appends <think>\n so the model reasons
# before closing the block with </think> and producing its final answer.
# True is the default for Granite 4.2, but passing it explicitly is good practice.
#
# IMPORTANT: always pre-tokenize with add_special_tokens=False.
# Passing a plain string to generate() triggers re-encoding with add_special_tokens=True,
# which prepends a spurious BOS token and collapses the thinking block to empty.
prompt_str = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=True,         # show Think block
)
prompt = tokenizer.encode(prompt_str, add_special_tokens=False)

response = generate(model, tokenizer, prompt=prompt, temp=1.0, top_p=0.95, max_tokens=1024)
print(response)

Disable thinking

Direct answer with no <think> block:

from mlx_lm import load, generate

model, tokenizer = load(
    "ibm-granite/granite-4.2-8b-q8-mlx"
)

messages = [{"role": "user", "content": "Summarize this paragraph in one sentence."}]

prompt_str = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False,        # skip the <think> block entirely
)
prompt = tokenizer.encode(prompt_str, add_special_tokens=False)

response = generate(model, tokenizer, prompt=prompt, temp=1.0, top_p=0.95, max_tokens=256)
print(response)

Low-effort (faster) reasoning:

reasoning_effort controls the depth of the thinking pass. The default is "high" (full-depth reasoning). Set it to "low" for a shorter, faster reasoning pass.

# reasoning_effort="low"  → shorter, faster reasoning pass
# reasoning_effort="high" → full-depth reasoning (default; same as omitting the parameter)
prompt_str = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    reasoning_effort="low",
)
prompt = tokenizer.encode(prompt_str, add_special_tokens=False)

response = generate(model, tokenizer, prompt=prompt, temp=1.0, top_p=0.95, max_tokens=512)
print(response)
Supported Languages#

Supported Languages: English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 4.2 models for languages beyond these languages.

Intended Use#

This model is designed to handle general instruction-following tasks and can be integrated into AI assistants across various domains, including business applications.

Capabilities#
  • Summarization
  • Text classification
  • Text extraction
  • Question-answering
  • Retrieval Augmented Generation (RAG)
  • Code related tasks
  • Function-calling tasks
  • Multilingual dialog use cases
  • Fill-In-the-Middle (FIM) code completions
  • Thinking / extended reasoning (enable_thinking, reasoning_effort)

Learn more#

Files

10 files · 9.35 GBWeights 9.34 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md10.6 KBd44f3bfb0aa7dd188b7d2c212d736db320d01bd766d6836ef1b16b4b5808a2b8
chat_template.jinja9.01 KBf0ba43f79b3cabca5e5a7584c77aec92f49feae45cdf7779c87d9fc54cd90258
config.json1.19 KBa98aabaf554006ac147b35d3096f98941c75ec2e54bb1907caa36eb284712289
generation_config.json207 B1b9baf0a7959d31d7fb58ff6b506c27d09a73d395cadccc7e6dd1d4b7e43fd9d
granite-4.2-8b-q8-metadata.properties1.34 KBcc6fd74671c3afe4999644aebab193c673e83a676c22d9def60ddc20179d7394
model-00001-of-00002.safetensors5.35 GB7074bc238a2b63882c9e3a2ca2cf079e84ae367d96576db7547a28c26bec79b8
model-00002-of-00002.safetensors3.99 GB3aaf90d793bbc73d09ed8767f9c69aa27f7a23323892b80a886d5c03b12c337c
tokenizer.json7.15 MB883975314d58743726347caaf2c32ac89afd5ad57222cffbc4f052f2ab27b2d7
tokenizer_config.json436 B0b1cc678b9fbde8ce90c81e0f6483c4e1696dfa377330e42a88106416b96e659
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
a60999a162 pinned now2026-11-15 05:09 UTC10 files · 9.35 GB

Use it

$ fw get ibm-granite/granite-4.2-8b-q8-mlx
# manifest sha256 be70e4e8427e… · 9.35 GB · 10 files
$ fw verify ./granite-4.2-8b-q8-mlx ibm-granite/granite-4.2-8b-q8-mlx
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/ibm-granite/granite-4.2-8b-q8-mlx.json --dir ./granite-4.2-8b-q8-mlx $ python3 fw.py verify ./granite-4.2-8b-q8-mlx ./ibm-granite__granite-4.2-8b-q8-mlx.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-4.2-8b-q8-mlx --revision a60999a162a4799c52a7bd6ec65c780d6138cfcf --local-dir ./granite-4.2-8b-q8-mlx

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
d44f3bfb0aa7dd188b7d2c212d736db320d01bd766d6836ef1b16b4b5808a2b8
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: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject: granite-4.2-8b-q8-mlxDate: 2026-11-15Commit: a60999aSigned: 2DC28CC7B26A283B ✓
Upstream
ibm-granite/granite-4.2-8b-q8-mlx
Pinned commit
a60999a162a4799c52a7bd6ec65c780d6138cfcf
Manifest
granite-4.2-8b-q8-mlx.json · .minisig
Manifest sha256
be70e4e8427ef6af0caa79d07d61989e4d9bf698316a02f27c7845e22c6bf1f6
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:09 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-4.2-8b-q8-mlx.json $ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-4.2-8b-q8-mlx.json.minisig $ minisign -Vm granite-4.2-8b-q8-mlx.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.2-8b · 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 ibm-granite/granite-4.2-8b-q8-mlx
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.2-8b-q8-mlx.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