alt.freeweights.granite / granite-8b-code-instruct-accelerator
From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject:

granite-8b-code-instruct-accelerator

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

Model with 2.1B parameters. Safetensors weights, 4.20 GB in all. Published by ibm-granite under Apache-2.0.

2.1B params4.20GBgranite-8b-code-instruct-acceleratorsafetensorspermissive
FactsParams2.1BSize4.20 GBFormatssafetensorsTasknot taggedLicenseApache-2.0From sourcepermissive
$ fw get ibm-granite/granite-8b-code-instruct-accelerator
# manifest sha256 608851379fed… · 4.20 GB · 9 files
$ fw verify ./granite-8b-code-instruct-accelerator ibm-granite/granite-8b-code-instruct-accelerator
From sourceHosted (signed)ibm-granite/granite-8b-code-instruct-acceleratorLast check: 2026-11-15 04:04 UTC

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

Works with

Runs with

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

Overview

Size
4.20 GB
Weights
4.19 GB (safetensors)
Parameters
2.1B
Formats
safetensors
Task
not tagged
License
Apache-2.0 (permissive)
Files
9, each with a sha256
Publisher
ibm-granite
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

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

Model card

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

Installation from source#

git clone https://github.com/foundation-model-stack/fms-extras
cd fms-extras
pip install -e .

Description#

This model is intended to be used as an accelerator for granite-8b-code-instruct and takes inspiration from the Medusa speculative decoding architecture. This accelerator modifies the MLP into a multi-stage MLP, where each stage predicts a single token in the draft based on both a state vector and sampled token from the prior stage (the base model can be considered stage 0). The state vector from the base model provides contextual information to the accelerator, while conditioning on prior sampled tokens allows it to produce higher-quality draft n-grams.

Note: The underlying MLP speculator is a generic architecture that can be trained with any generative model to accelerate inference. Training is light-weight and can be completed in only a few days depending on base model size and speed.

  1. Paged Attention KV-Cache / Speculator
  2. Production Server with speculative decoding
  3. Speculator training

Samples#

Note: For all samples, your environment must have access to cuda

Use in IBM Production TGIS#

To try this out running in a production-like environment, please use the pre-built docker image:

Setup#
HF_HUB_CACHE=/hf_hub_cache
chmod a+w $HF_HUB_CACHE
HF_HUB_TOKEN="your huggingface hub token"
TGIS_IMAGE=quay.io/wxpe/text-gen-server:main.ddc56ee

docker pull $TGIS_IMAGE

# optionally download granite-8b-code-instruct if the weights do not already exist
docker run --rm \
    -v $HF_HUB_CACHE:/models \
    -e HF_HUB_CACHE=/models \
    -e TRANSFORMERS_CACHE=/models \
    $TGIS_IMAGE \
    text-generation-server download-weights \
    ibm-granite/granite-8b-code-instruct \
    --token $HF_HUB_TOKEN

# optionally download the speculator model if the weights do not already exist
docker run --rm \
    -v $HF_HUB_CACHE:/models \
    -e HF_HUB_CACHE=/models \
    -e TRANSFORMERS_CACHE=/models \
    $TGIS_IMAGE \
    text-generation-server download-weights \
    ibm-granite/granite-8b-code-instruct-accelerator \
    --token $HF_HUB_TOKEN

# note: if the weights were downloaded separately (not with the above commands), please place them in the HF_HUB_CACHE directory and refer to them with /models/<model_name>
docker run -d --rm --gpus all \
    --name my-tgis-server \
    -p 8033:8033 \
    -v $HF_HUB_CACHE:/models \
    -e HF_HUB_CACHE=/models \
    -e TRANSFORMERS_CACHE=/models \
    -e MODEL_NAME=ibm-granite/granite-8b-code-instruct \
    -e SPECULATOR_NAME=ibm-granite/granite-8b-code-instruct-accelerator \
    -e FLASH_ATTENTION=true \
    -e PAGED_ATTENTION=true \
    -e DTYPE=float16 \
    $TGIS_IMAGE

# check logs and wait for "gRPC server started on port 8033" and "HTTP server started on port 3000"
docker logs my-tgis-server -f

# get the client sample (Note: The first prompt will take longer as there is a warmup time)
conda create -n tgis-client-env python=3.11
conda activate tgis-client-env
git clone --branch main --single-branch https://github.com/IBM/text-generation-inference.git
cd text-generation-inference/integration_tests
make gen-client
pip install . --no-cache-dir
Run Sample#
python sample_client.py

Note: first prompt may be slower as there is a slight warmup time

Use in Huggingface TGI#
start the server#
model=ibm-granite/granite-8b-code-instruct-accelerator
volume=$PWD/data # share a volume with the Docker container to avoid downloading weights every run
docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:latest --model-id $model

note: for tensor parallel, add --num-shard

make a request#
curl 127.0.0.1:8080/generate_stream \
    -X POST \
    -d '{"inputs":"Write a bubble sort in python","parameters":{"max_new_tokens":100}}' \
    -H 'Content-Type: application/json'

Files

9 files · 4.20 GBWeights 4.19 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 9 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md4.24 KB13978c5d974c028446ab57884eb66dd62d8992baa8a4f71b1d0c36c86f0c02d1
config.json401 B5cf7db1c02d8cce239c3cb3df651d641a4731953ae817554e83a1bd66134c58f
merges.txt442 KB303127a244b0078878156c17229f36d11b7a3a3f8e47b7cfdbb304ff46be5030
model.safetensors4.19 GB9953d73255cc44b56f1d0c84fb0413a1da723a26094fe5d6541314275d9969b4
special_tokens_map.json1.02 KB2f2bba45146f073a7b8a097cb6133a6b4b66d5751e73f2a2aca81083288813e9
tokenizer.json2.06 MBd3b4df07a0ce3940b15c77e2ea17ab5627ca0c4bf982d2eb37966aea0a81c918
tokenizer_config.json4.54 KBf533a8dbb8526be9e8f5b218e6d7be21cb4ce6fd2068286ab7e78d98ecc9a053
vocab.json777 KB20175afb9f164fad4829aca2279f8df7eeff1e2e3f671378aaa287a740aff09f
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
edbe9301d5 pinned now2026-11-15 04:04 UTC9 files · 4.20 GB

Use it

$ fw get ibm-granite/granite-8b-code-instruct-accelerator
# manifest sha256 608851379fed… · 4.20 GB · 9 files
$ fw verify ./granite-8b-code-instruct-accelerator ibm-granite/granite-8b-code-instruct-accelerator
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-8b-code-instruct-accelerator.json --dir ./granite-8b-code-instruct-accelerator $ python3 fw.py verify ./granite-8b-code-instruct-accelerator ./ibm-granite__granite-8b-code-instruct-accelerator.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-8b-code-instruct-accelerator --revision edbe9301d51d35cb968327db184bfaa4ad01e317 --local-dir ./granite-8b-code-instruct-accelerator

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
13978c5d974c028446ab57884eb66dd62d8992baa8a4f71b1d0c36c86f0c02d1
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-8b-code-instruct-acceleratorDate: 2026-11-15Commit: edbe930Signed: 2DC28CC7B26A283B ✓
Upstream
ibm-granite/granite-8b-code-instruct-accelerator
Pinned commit
edbe9301d51d35cb968327db184bfaa4ad01e317
Manifest
granite-8b-code-instruct-accelerator.json · .minisig
Manifest sha256
608851379fede7dde68b2459bdd569a13c78d2cb4c8aadca6bc03e1f341f9b76
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:04 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-8b-code-instruct-accelerator.json $ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-8b-code-instruct-accelerator.json.minisig $ minisign -Vm granite-8b-code-instruct-accelerator.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

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-8b-code-instruct-accelerator
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. granite-8b-code-instruct-accelerator.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