Run Granite 4.0 H Micro on a Linux RTX 4090 desktop
Use an existing Linux desktop with one GeForce RTX 4090 to serve IBM’s 3B Granite 4.0 H Micro instruct checkpoint. Pin the original BF16 weights and vLLM 0.31.0, keep access on loopback, and check a short chat at a 4,096-token context. This is the catalog’s H Micro artifact, distinct from non-H Micro. Documented instructions; no measured fit or speed claim.
- Hardware
- One NVIDIA GeForce RTX 4090 on Linux x86_64
- Runtime
- vLLM 0.31.0+cu129 · CUDA
- Model format
- safetensors · BF16 · None; original BF16 weights
- Workload
- 4,096 token context · 1 concurrent
Based on source documentation; this setup has not been executed by OpenTools. Memory: unknown. No compatible measurement available.
Read the complete setup guide
Before you start
- An already provisioned Linux x86_64 host with one NVIDIA GeForce RTX 4090 (manufacturer-labeled 24 GB dedicated memory); no claim that this is a tested minimum.
- Python 3.12 with virtual-environment support, curl, sha256sum, outbound HTTPS to the official package/model hosts, and a working CUDA-compatible NVIDIA driver.
- The full repository download is about 6.39 GB. Allow additional disk for the virtual environment, package cache and runtime files; complete disk and RAM minima have not been measured.
- A trusted single-user deployment: this guide binds vLLM to 127.0.0.1. Do not publish port 8000 or treat the API key as protection for every vLLM route.
- Check your desktop case, cooling, GPU power connectors and power supply against NVIDIA’s installation requirements. The RTX 4090 page lists an 850 W minimum system power recommendation; GPU maximum power is not measured wall draw. This guide assumes the GPU is already installed and its driver works.
Exact model and requirements
- Artifact:
- IBM / Granite 4.0 H Micro · checkpoint ibm-granite/granite-4.0-h-micro
- Publisher revision:
- d5f01a3ea75f088947be3aae039f4ad52837dfde
- Artifact digest:
- No single publisher digest identifies the full repository; exact per-file hashes and the repository commit are pinned.
- Download size:
- 5.94 GiB
- Memory requirement (unknown):
- Unknown — Complete GPU footprint has not been measured: model weights, KV cache, runtime allocations, compilation and workspace must all fit.
- System RAM / disk:
- Unknown / Unknown
- Placement:
- single device. One GPU; no tensor or pipeline sharding and no pooling of GPU and host RAM. No CPU or disk weight offload is enabled.
- KV cache:
- BF16 attention KV cache via auto with BF16 weights. Prefix caching disabled; Mamba cache mode none; Triton Mamba backend; BF16 Mamba convolution and SSM state. No separate mamba_ssm package.
- Workload:
- 4,096 token context; Unknown; Unknown; concurrency 1; batch 1; cache cold; repetitions Unknown.
- Tokenizer:
- ibm-granite/granite-4.0-h-micro · d5f01a3ea75f088947be3aae039f4ad52837dfde
- Sampling / reasoning:
- Verification uses temperature 0 and max_tokens 64. The service uses --generation-config vllm; this is not a throughput protocol. Prefix caching is explicitly disabled; no warm-cache measurement is inferred. Instruct checkpoint with no separate reasoning parser or budget. This recipe checks text chat only; it does not validate tool calling, FIM, structured output or long-context quality.
- Runtime prerequisites:
- Linux x86_64; Python 3.12; Working NVIDIA driver R580 or newer; CUDA 12.x applications remain supported by newer drivers through backward compatibility. Verify the selected environment with nvidia-smi and torch.cuda.is_available()..
IBM declares Apache 2.0 for this checkpoint. Read the license, retain applicable copyright, license and attribution notices, and mark modifications when redistributing covered work. No provider API subscription is needed to download these ungated weights.
- chat_template.jinja · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- config.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- generation_config.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- merges.txt · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- model-00001-of-00002.safetensors · 4.65 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- model-00002-of-00002.safetensors · 1.3 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- model.safetensors.index.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- special_tokens_map.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- tokenizer.json · 0.01 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- tokenizer_config.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- vocab.json · 0 GiB · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- The two BF16 weight shards total 6,382,844,048 bytes. The full repository is about 6.39 GB. Neither figure is a complete runtime RAM/VRAM or disk requirement.
- The selected GeForce RTX 4090 is labeled 24 GB by the vendor. Dedicated GPU memory and system RAM are different pools and are not summed.
- No measured peak memory, completed-run evidence, tokens per second or latency result is supplied. A documented runtime architecture match does not prove this exact deployment fits.
- H Micro uses attention and Mamba layers (GraniteMoeHybridForCausalLM). Do not estimate its full cache from a transformer-only KV formula or substitute the non-H Micro checkpoint.
One-time setup and hardware
- Hardware purchase
- Unknown — No dated hardware purchase quote is available; existing ownership is not treated as a zero purchase price.
- No dated hardware purchase quote is available; existing ownership is not treated as a zero purchase price. Tax: unknown.
- Initial setup work
- Unknown — Initial setup time is not priced; no labour rate or duration has been measured.
- Initial setup time is not priced; no labour rate or duration has been measured. Tax: unknown.
Recurring costs
- Electricity
- Unknown — Whole-system measured wall power, powered-on hours and the reader’s electricity tariff are unknown. GPU maximum board power is not a measured system draw.
- Whole-system measured wall power, powered-on hours and the reader’s electricity tariff are unknown. GPU maximum board power is not a measured system draw. Tax: unknown.
- Operations and maintenance
- Unknown — Ongoing patching and operation effort is not measured or priced.
- Ongoing patching and operation effort is not measured or priced. Tax: unknown.
- Persistent storage
- Unknown — The owned host storage arrangement and any recurring backup or storage bill are unknown; no monthly amount is asserted.
- The owned host storage arrangement and any recurring backup or storage bill are unknown; no monthly amount is asserted. Tax: unknown.
- Data transfer
- Unknown — The reader’s internet or network plan and traffic volume are unknown; loopback requests alone do not establish total network costs.
- The reader’s internet or network plan and traffic volume are unknown; loopback requests alone do not establish total network costs. Tax: unknown.
Install the runtime
1. Check the existing GPU host
Use an already provisioned Linux x86_64 server with one GeForce RTX 4090, Python 3.12 with venv support, curl, sha256sum, and a working NVIDIA R580-or-newer driver. Driver provisioning is a server-administrator prerequisite; this guide does not replace the host driver. Keep the machine on a trusted network and ensure port 8000 is unused.
Commandnvidia-smi python3.12 --version df -h "$HOME"Expected result: The GeForce RTX 4090 is visible, Python reports 3.12, and there is enough free space for the 6.39 GB model download plus the Python environment, package cache and runtime workspace.
2. Create an isolated environment and install pinned vLLM
Run in a new shell on the GPU host. The exact CUDA 12.9 vLLM wheel is pinned by release and publisher-provided SHA256. Dependencies resolve inside this fresh environment; do not mix the AMI or host Python environment into it. The system CUDA toolkit version need not equal the bundled wheel runtime. If python3.12 -m venv is unavailable, install your OS vendor’s Python 3.12 venv package first.
Commandmkdir -p "$HOME/granite4-h-micro-hosting" cd "$HOME/granite4-h-micro-hosting" python3.12 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip python -m pip install --extra-index-url https://download.pytorch.org/whl/cu129 'https://github.com/vllm-project/vllm/releases/download/v0.31.0/vllm-0.31.0%2Bcu129-cp38-abi3-manylinux_2_28_x86_64.whl#sha256=5176ab746f4e736c4a354a11d0620abf0a941de287cad937ac34039293ca6f5f' python -m pip check vllm --version python -c 'import torch; print("CUDA available:", torch.cuda.is_available()); print("GPU:", torch.cuda.get_device_name(0) if torch.cuda.is_available() else "not detected")'Expected result: pip check reports no broken requirements; vllm reports version 0.31.0 (the wheel may include +cu129); CUDA available is True and the GPU is NVIDIA GeForce RTX 4090. This is an expected check for the reader, not a result observed by OpenTools.
Download the model
1. Download IBM’s exact H Micro snapshot
The catalog points to H Micro, not the separate non-H Micro repository. Pin weights, tokenizer, configuration and chat template together. The repository metadata reports ungated access when checked.
Commandcd "$HOME/granite4-h-micro-hosting" source .venv/bin/activate python - <<'PY' from huggingface_hub import snapshot_download snapshot_download(repo_id="ibm-granite/granite-4.0-h-micro", revision="d5f01a3ea75f088947be3aae039f4ad52837dfde", local_dir="./model") PYExpected result: ./model contains both weight shards, config.json, tokenizer files, chat_template.jinja and the weight index from the exact pinned revision.
2. Verify both weight shards
Compare the downloaded files with SHA256 values exposed by IBM’s official repository metadata. Stop on any mismatch.
Commandcd "$HOME/granite4-h-micro-hosting" sha256sum --check <<'SHA256' 883f134c083852597a3033cfc7de8357acde530b3fe941a567f507431f5c9216 model/model-00001-of-00002.safetensors 987e8aee10c40446c71f4c91d689672f1805f94712738f7a44d06a7dee5e787f model/model-00002-of-00002.safetensors SHA256Expected result: Both weight files report OK.
Configure
1. Create a private local service key
Run on the GPU host. This writes a fresh random key only when the file is absent, keeps it mode 600 and exports it without printing it. Treat the key file as private. vLLM API-key checks do not cover every route, so keep the loopback binding used below.
Commandcd "$HOME/granite4-h-micro-hosting" source .venv/bin/activate umask 077 python - <<'PY' import secrets from pathlib import Path key = Path(".vllm-api-key") if not key.exists(): key.write_text(secrets.token_urlsafe(32)) key.chmod(0o600) PY export VLLM_API_KEY="$(cat .vllm-api-key)"Expected result: A private .vllm-api-key file exists in the dedicated directory; no secret is printed. The shell environment contains VLLM_API_KEY.
Start the model
1. Start the private Granite 4.0 H Micro endpoint
Run the verified local snapshot in a dedicated foreground terminal. The runtime supports the GraniteMoeHybridForCausalLM architecture declared by this checkpoint. Use BF16 weights, one GPU, no weight offload and one active sequence. The 4,096-token limit covers prompt plus output; this is a bounded text-chat setup rather than a test of the advertised 131,072-token maximum. Wait for initialization and pass the checks below before treating the service as usable. Prefix caching disabled; Mamba cache mode none; Triton Mamba backend; BF16 Mamba convolution and SSM state. No separate mamba_ssm package. The vLLM wheel supplies its internal Mamba kernels.
Commandcd "$HOME/granite4-h-micro-hosting" source .venv/bin/activate export VLLM_API_KEY="$(cat .vllm-api-key)" vllm serve ./model \ --served-model-name granite4-h-micro-local \ --host 127.0.0.1 --port 8000 \ --dtype bfloat16 --kv-cache-dtype auto \ --max-model-len 4096 --max-num-seqs 1 \ --tensor-parallel-size 1 --pipeline-parallel-size 1 \ --generation-config vllm \ --no-enable-prefix-caching --mamba-cache-mode none \ --mamba-backend triton --mamba-cache-dtype bfloat16 --mamba-ssm-cache-dtype bfloat16Expected result: The process remains running and announces an HTTP listener on 127.0.0.1:8000 after model initialization. If it exits, use the troubleshooting checks before making any success or performance claim.
Connect to your endpoint
http://127.0.0.1:8000/v1
Run clients and verification on the GPU host. Only that host loopback is bound. Remote clients need a separately controlled SSH tunnel; do not change --host to a public interface for convenience.
Access: loopback. VLLM_API_KEY is a reader-generated local service key for /v1, /v2 and /inference paths. Other paths may remain unauthenticated; the loopback boundary is essential. Other users on the same host can reach loopback, so use a trusted single-user machine.
Verify the setup
1. Check the model identity
Open a second terminal on the same GPU host. Load the local key without displaying it and call the authenticated models endpoint.
Commandcd "$HOME/granite4-h-micro-hosting" export VLLM_API_KEY="$(cat .vllm-api-key)" curl --fail --silent --show-error http://127.0.0.1:8000/v1/models \ -H "Authorization: Bearer $VLLM_API_KEY"Expected result: The JSON response contains the served model id granite4-h-micro-local. The endpoint responds successfully only after startup completes.
2. Request a short response
In that second terminal, send a small chat request. This checks response generation; it is not a benchmark and provides no throughput or latency guarantee.
Commandcurl --fail --silent --show-error http://127.0.0.1:8000/v1/chat/completions \ -H "Authorization: Bearer $VLLM_API_KEY" \ -H 'Content-Type: application/json' \ -d '{"model":"granite4-h-micro-local","messages":[{"role":"user","content":"Explain what a GPU does in one sentence."}],"max_tokens":64,"temperature":0}'Expected result: A successful JSON response includes a nonempty choices[0].message.content. Wording varies; no exact answer or speed is guaranteed.
3. Verify the access boundary
Check that the listener is only on 127.0.0.1:8000 and that the /v1 route rejects a missing key. Keep the listener on desktop loopback.
Commandss -ltn | grep '127.0.0.1:8000' curl --silent --output /dev/null --write-out '%{http_code}\n' http://127.0.0.1:8000/v1/modelsExpected result: The listener is on loopback and the unauthenticated /v1/models request is denied (normally HTTP 401). This denial does not prove that every server path is authenticated.
Performance evidence
No compatible measurement available. Documented support and estimated memory do not establish response speed.
Limits and troubleshooting
- These are documented instructions assembled from publisher and runtime sources. OpenTools has not executed this configuration or measured its full memory fit, throughput or latency.
- The frozen catalog API identifier is ibm-granite/granite-4.0-h-micro. IBM also publishes a different granite-4.0-micro checkpoint. This guide deliberately uses H Micro; weights, configuration and memory observations must not be transferred between them.
- IBM describes H Micro as a 3B instruct model; its configuration combines Mamba and attention layers. vLLM lists its GraniteMoeHybridForCausalLM architecture. An architecture match is documented support, not proof that this exact pinned deployment starts successfully.
- The publisher config permits 131,072 positions. This recipe sets 4,096 combined prompt and output tokens with one active sequence. Larger context, concurrent users and a different cache policy create different configurations.
- The verification request checks text generation only. IBM documents tool calling and other uses, but this service recipe does not configure or verify a tool parser, FIM or structured output. Generated answers can be wrong; validate results for the intended task.
- The runtime wheel is pinned; its dependencies resolve at installation. Save pip freeze with any actual run evidence. The host NVIDIA driver remains an administrator prerequisite.
- Loopback is reachable by other users on the host. Use a trusted single-user desktop. Run the client on that same desktop. Remote access and a public authenticated gateway are outside this local recipe.
- The pinned vLLM hybrid implementation requires an aligned Mamba cache when prefix caching is enabled; this basic recipe disables prefix caching and sets Mamba cache mode none. Enabling prefix caching or changing Mamba state precision changes the configuration.
- nvidia-smi fails or PyTorch reports CUDA unavailable
- Check the physical/virtual GPU and host driver before downloading weights. Check the installed desktop driver and GPU power/cooling. Use a fresh environment and the pinned CUDA 12.9 wheel; do not mix a pre-existing torch installation into it.
- Installation or download runs out of disk space
- Check the filesystem containing $HOME/granite4-h-micro-hosting and package caches. The model download alone is about 6.39 GB; add space for the environment and runtime files. Resume the same pinned snapshot and repeat all shard checks.
- Model loading or runtime initialization runs out of GPU or host memory
- Stop other GPU workloads and inspect nvidia-smi. Complete memory fit is unknown. Lowering context, changing precision or moving to different hardware creates a different configuration; do not report that as a successful run of this exact recipe.
- Port 8000 is already used
- Stop the conflicting service you own or choose another loopback port consistently in the start command, checks and SSH tunnel. Do not expose a public interface to work around a local port conflict.
- A /v1 request returns 401
- In the client terminal load the same private .vllm-api-key file used by the server and send Authorization: Bearer. Restart the server after deliberately rotating the key.
Stop the model
1. Stop the model process
Press Ctrl-C in the terminal running vllm and wait for shutdown. Then check from the host terminal that the endpoint no longer answers. Confirm GPU memory is released with nvidia-smi.
Commandcurl --connect-timeout 3 http://127.0.0.1:8000/v1/modelsExpected result: The request cannot connect after the listener has stopped. Confirm no other process has taken the same port before assuming the host is idle.
Uninstall
1. Remove only this guide’s environment and files
After stopping the server, preserve any needed outputs, then remove the dedicated $HOME/granite4-h-micro-hosting directory you created, including its virtual environment, downloaded model and private key. Check the path before deleting; do not remove shared model caches or another project. Remove any copied client key as well. The host NVIDIA driver is not removed.
Commanddeactivate unset VLLM_API_KEYExpected result: The dedicated directory is removed when you choose to delete it; the shell no longer uses the virtual environment or service key. Shared host configuration remains separate.
Sources and verification
Sources checked Oct 16, 2026. Verification source
- https://www.nvidia.com/en-us/data-center/l40s/manufacturer · retrieved Oct 15, 2026
- https://huggingface.co/api/models/ibm-granite/granite-4.0-h-micro?blobs=trueofficial · retrieved Oct 16, 2026 · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- https://huggingface.co/ibm-granite/granite-4.0-h-micro/raw/d5f01a3ea75f088947be3aae039f4ad52837dfde/README.mdofficial · retrieved Oct 16, 2026 · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- https://huggingface.co/ibm-granite/granite-4.0-h-micro/raw/d5f01a3ea75f088947be3aae039f4ad52837dfde/config.jsonofficial · retrieved Oct 16, 2026 · revision d5f01a3ea75f088947be3aae039f4ad52837dfde
- https://www.nvidia.com/en-us/geforce/graphics-cards/40-series/rtx-4090/manufacturer · retrieved Oct 16, 2026
- https://docs.vllm.ai/en/v0.31.0/models/supported_models/runtime maintainer · retrieved Oct 15, 2026 · revision v0.31.0
- https://docs.vllm.ai/en/v0.31.0/cli/serve/runtime maintainer · retrieved Oct 15, 2026 · revision v0.31.0
- https://www.apache.org/licenses/LICENSE-2.0.txtofficial · retrieved Oct 16, 2026
- https://api.github.com/repos/vllm-project/vllm/releases/latestruntime maintainer · retrieved Oct 15, 2026 · dated Oct 5, 2026 · revision v0.31.0
- https://docs.vllm.ai/en/v0.31.0/getting_started/installation/gpu/runtime maintainer · retrieved Oct 15, 2026 · revision v0.31.0
- https://raw.githubusercontent.com/vllm-project/vllm/v0.31.0/vllm/model_executor/models/granitemoehybrid.pyruntime maintainer · retrieved Oct 16, 2026 · revision v0.31.0
- https://raw.githubusercontent.com/vllm-project/vllm/v0.31.0/vllm/config/cache.pyruntime maintainer · retrieved Oct 16, 2026 · revision v0.31.0
- https://raw.githubusercontent.com/vllm-project/vllm/v0.31.0/vllm/model_executor/layers/mamba/mamba_mixer2.pyruntime maintainer · retrieved Oct 16, 2026 · revision v0.31.0
- https://raw.githubusercontent.com/vllm-project/vllm/v0.31.0/vllm/config/vllm.pyruntime maintainer · retrieved Oct 16, 2026 · revision v0.31.0
- https://raw.githubusercontent.com/vllm-project/vllm/v0.31.0/vllm/config/mamba.pyruntime maintainer · retrieved Oct 16, 2026 · revision v0.31.0
- https://docs.vllm.ai/en/v0.31.0/getting_started/quickstart/runtime maintainer · retrieved Oct 15, 2026 · revision v0.31.0
- https://docs.nvidia.com/deploy/cuda-compatibility/minor-version-compatibility.htmlmanufacturer · retrieved Oct 15, 2026
- https://huggingface.co/docs/huggingface_hub/guides/downloadofficial · retrieved Oct 15, 2026
- https://huggingface.co/api/models/microsoft/phi-4?blobs=truepublisher · retrieved Oct 15, 2026 · revision 2db69c1c3e91a05d2c64a3185acfbaf36f744e25