Downloads · 30 days
23
25% of all-time downloads
TevunahAi/granite-34b-code-instruct-8k-Ultra-Hybrid
granite-34b-code-instruct-8k-Ultra-Hybrid is a text generation model from TevunahAi. Use it when you need the model to write or continue text. It is set up for vllm. The card lists the license as apache-2.0.
Enterprise-quality hybrid quantization of IBM Granite 34B Code with 2048-sample calibration (8x industry standard)
Downloads · 30 days
23
25% of all-time downloads
All-time downloads
92
Public
Parameters
11B
21.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors21.8 GB · 100%
How the weights are stored.
I3226.6B · 78%
From the Hugging Face model README
Enterprise-quality hybrid quantization of IBM Granite 34B Code with 2048-sample calibration (8x industry standard)
⚠️ Requires vLLM for inference - Standard transformers library does not yet support mixed-precision quantization
IBM Granite 34B Code is a decoder-only code model trained on 116 programming languages, optimized for code generation, bug fixing, code explanation, and documentation.
| Layer Type | Precision | Rationale |
|---|---|---|
| Embeddings (wte, wpe) | FP16 | Preserved for quality |
| First 2 Attention | FP8 | Foundation layers need precision |
| Middle Attention (Layers 2-85) | W8A8 (INT8) | Balanced performance |
| Last 2 Attention | FP8 | Output precision critical |
| ALL MLP Layers | W4A16 (INT4) | ~67% of parameters - massive savings |
| lm_head | FP16 | Output head preserved |
| LayerNorms | FP16 | Normalization layers preserved |
| Property | Value |
|---|---|
| Base Model | ibm-granite/granite-34b-code-instruct-8k |
| Architecture | GPTBigCode (StarCoder variant) |
| Method | Ultra Hybrid (W4A16 + W8A8 + FP8) |
| Total Layers | 88 |
| Calibration Samples | 2,048 (Professional Grade) |
| Calibration Datasets | Open-Platypus, UltraChat-200k, OpenHermes-2.5, SlimOrca |
| Hardware | Dual Xeon Max 9480 + RTX 5000 Ada |
| Optimizations | AMX (Sapphire Rapids), TF32 (Ada Lovelace) |
| Model Size | 21.8GB |
| VRAM Usage | 20.4GB (with vLLM) |
| Version | Size | Compression vs FP16 | Compression vs FP8 | Quality |
|---|---|---|---|---|
| FP16 | 68GB | 1.0x | - | 100% |
| FP8 | 34.7GB | 1.96x | 1.0x | 98-99% |
| Ultra Hybrid | 21.8GB | 3.12x | 1.59x | 98-99% |
Tested on NVIDIA RTX 5000 Ada (32GB):
Installation:
pip install vllm
Basic Inference:
from vllm import LLM, SamplingParams
# Load model
llm = LLM("TevunahAi/granite-34b-code-instruct-8k-Ultra-Hybrid")
# Configure generation
sampling_params = SamplingParams(
temperature=0.7,
top_p=0.9,
max_tokens=200
)
# Generate
prompts = ["Write a Python function to calculate fibonacci numbers:"]
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
OpenAI-Compatible API Server:
python -m vllm.entrypoints.openai.api_server \
--model TevunahAi/granite-34b-code-instruct-8k-Ultra-Hybrid \
--host 0.0.0.0 \
--port 8000
Then use with OpenAI client:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="token-abc123" # dummy key
)
response = client.completions.create(
model="TevunahAi/granite-34b-code-instruct-8k-Ultra-Hybrid",
prompt="Write a function to reverse a string:",
max_tokens=100
)
print(response.choices[0].text)
This model uses mixed-precision quantization (INT4 + INT8 + FP8 combined), which is cutting-edge technology. Currently:
As the ecosystem matures, transformers support will likely be added. For now, vLLM provides the best performance.
Unlike consumer-grade quantizations that use 256 calibration samples, TevunahAi uses 2,048 diverse samples (8x industry baseline) to ensure:
| Use Case | VRAM | Notes |
|---|---|---|
| Minimum | 24GB | RTX 4090, RTX A5000 |
| Recommended | 32GB | RTX 5000 Ada, A100 40GB |
| Optimal | 48GB+ | RTX 6000 Ada, A100 80GB |
Strengths:
Best For:
@misc{granite-34b-ultra-hybrid,
author = {TevunahAi},
title = {Granite 34B Code Ultra Hybrid Quantization},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/TevunahAi/granite-34b-code-instruct-8k-Ultra-Hybrid}},
note = {Professional-grade mixed-precision quantization with 2048-sample calibration}
}
This model inherits the Apache 2.0 License from IBM Granite.