Instructions to use Mungert/granite-4.0-h-micro-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mungert/granite-4.0-h-micro-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Mungert/granite-4.0-h-micro-GGUF", dtype="auto") - llama-cpp-python
How to use Mungert/granite-4.0-h-micro-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Mungert/granite-4.0-h-micro-GGUF", filename="granite-4.0-h-micro-bf16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mungert/granite-4.0-h-micro-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Mungert/granite-4.0-h-micro-GGUF with Ollama:
ollama run hf.co/Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
- Unsloth Studio
How to use Mungert/granite-4.0-h-micro-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mungert/granite-4.0-h-micro-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mungert/granite-4.0-h-micro-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mungert/granite-4.0-h-micro-GGUF to start chatting
- Pi
How to use Mungert/granite-4.0-h-micro-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Mungert/granite-4.0-h-micro-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Mungert/granite-4.0-h-micro-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Mungert/granite-4.0-h-micro-GGUF with Docker Model Runner:
docker model run hf.co/Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
- Lemonade
How to use Mungert/granite-4.0-h-micro-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mungert/granite-4.0-h-micro-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.granite-4.0-h-micro-GGUF-Q4_K_M
List all available models
lemonade list
File size: 39,088 Bytes
8b36ba6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | ---
license: apache-2.0
library_name: transformers
tags:
- language
- granite-4.0
---
# <span style="color: #7FFF7F;">granite-4.0-h-micro GGUF Models</span>
## <span style="color: #7F7FFF;">Model Generation Details</span>
This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`ee09828cb`](https://github.com/ggerganov/llama.cpp/commit/ee09828cb057460b369576410601a3a09279e23c).
---
## <span style="color: #7FFF7F;">Quantization Beyond the IMatrix</span>
I've been experimenting with a new quantization approach that selectively elevates the precision of key layers beyond what the default IMatrix configuration provides.
In my testing, standard IMatrix quantization underperforms at lower bit depths, especially with Mixture of Experts (MoE) models. To address this, I'm using the `--tensor-type` option in `llama.cpp` to manually "bump" important layers to higher precision. You can see the implementation here:
👉 [Layer bumping with llama.cpp](https://github.com/Mungert69/GGUFModelBuilder/blob/main/model-converter/tensor_list_builder.py)
While this does increase model file size, it significantly improves precision for a given quantization level.
### **I'd love your feedback—have you tried this? How does it perform for you?**
---
<a href="https://readyforquantum.com/huggingface_gguf_selection_guide.html" style="color: #7FFF7F;">
Click here to get info on choosing the right GGUF model format
</a>
---
<!--Begin Original Model Card-->
# Granite-4.0-H-Micro
📣 **Update [10-07-2025]:** Added a *default system prompt* to the chat template to guide the model towards more *professional, accurate, and safe* responses.
**Model Summary:**
Granite-4.0-H-Micro is a 3B parameter long-context instruct model finetuned from *Granite-4.0-H-Micro-Base* using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. Granite 4.0 instruct models feature improved *instruction following (IF)* and *tool-calling* capabilities, making them more effective in enterprise applications.
- **Developers:** Granite Team, IBM
- **HF Collection:** [Granite 4.0 Language Models HF Collection](https://huggingface.co/collections/ibm-granite/granite-40-language-models-6811a18b820ef362d9e5a82c)
- **GitHub Repository:** [ibm-granite/granite-4.0-language-models](https://github.com/ibm-granite/granite-4.0-language-models)
- **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
- **Release Date**: October 2nd, 2025
- **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
**Supported Languages:**
English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 4.0 models for languages beyond these languages.
**Intended use:**
The model is designed to respond to general instructions and can be used to build AI assistants for multiple 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
<!-- <todo>Need to test the examples. (especially the tool calling and RAG ones)</todo>
-->
**Generation:**
This is a simple example of how to use Granite-4.0-H-Micro model.
Install the following libraries:
```shell
pip install torch torchvision torchaudio
pip install accelerate
pip install transformers
```
Then, copy the snippet from the section that is relevant for your use case.
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"
model_path = "ibm-granite/granite-4.0-h-micro"
tokenizer = AutoTokenizer.from_pretrained(model_path)
# drop device_map if running on CPU
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
model.eval()
# change input text as desired
chat = [
{ "role": "user", "content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location." },
]
chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
# tokenize the text
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
# generate output tokens
output = model.generate(**input_tokens,
max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# print output
print(output[0])
```
Expected output:
```shell
<|start_of_role|>system<|end_of_role|>You are a helpful assistant. Please ensure responses are professional, accurate, and safe.<|end_of_text|>
<|start_of_role|>user<|end_of_role|>Please list one IBM Research laboratory located in the United States. You should only output its name and location.<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>Almaden Research Center, San Jose, California<|end_of_text|>
```
**Tool-calling:**
Granite-4.0-H-Micro comes with enhanced tool calling capabilities, enabling seamless integration with external functions and APIs. To define a list of tools please follow OpenAI's function [definition schema](https://platform.openai.com/docs/guides/function-calling?api-mode=responses#defining-functions).
This is an example of how to use Granite-4.0-H-Micro model tool-calling ability:
```python
tools = [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather for a specified city.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Name of the city"
}
},
"required": ["city"]
}
}
}
]
# change input text as desired
chat = [
{ "role": "user", "content": "What's the weather like in Boston right now?" },
]
chat = tokenizer.apply_chat_template(chat, \
tokenize=False, \
tools=tools, \
add_generation_prompt=True)
# tokenize the text
input_tokens = tokenizer(chat, return_tensors="pt").to(device)
# generate output tokens
output = model.generate(**input_tokens,
max_new_tokens=100)
# decode output tokens into text
output = tokenizer.batch_decode(output)
# print output
print(output[0])
```
Expected output:
```shell
<|start_of_role|>system<|end_of_role|>You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "get_current_weather", "description": "Get the current weather for a specified city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "Name of the city"}}, "required": ["city"]}}}
</tools>
For each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.<|end_of_text|>
<|start_of_role|>user<|end_of_role|>What's the weather like in Boston right now?<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|><tool_call>
{"name": "get_current_weather", "arguments": {"city": "Boston"}}
</tool_call><|end_of_text|>
```
<!-- **Retrieval Augmented Generation:**
*Coming soon* -->
**Evaluation Results:**
<table>
<!-- <caption><b> All Results</b></caption> -->
<thead>
<tr>
<th style="text-align:left; background-color: #001d6c; color: white;">Benchmarks</th>
<th style="text-align:left; background-color: #001d6c; color: white;">Metric</th>
<th style="text-align:center; background-color: #001d6c; color: white;">Micro Dense</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Micro Dense</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Tiny MoE</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Small MoE</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
General Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMLU</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">65.98</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">67.43</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">68.65</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">78.44</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMLU-Pro</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">44.5</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">43.48</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">44.94</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">55.47</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BBH</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">3-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">72.48</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">69.36</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">66.34</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.62</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AGI EVAL</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">64.29</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">59</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">62.15</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">70.63</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GPQA</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">30.14</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">32.15</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">32.59</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">40.63</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Alignment Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AlpacaEval 2.0</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;"></td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">29.49</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">31.49</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">30.61</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">42.48</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">IFEval</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Instruct, Strict</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.5</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">86.94</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">84.78</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">89.87</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">IFEval</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Prompt, Strict</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">79.12</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81.71</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">78.1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.22</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">IFEval</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Average</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">82.31</td>
<td style="text-align:right; background-color:#DAE8FF; color: #2D2D2D;">84.32</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.44</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">87.55</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">ArenaHard</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">25.84</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">36.15</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">35.75</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">46.48</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Math Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GSM8K</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">85.45</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81.35</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">84.69</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">87.27</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">GSM8K Symbolic</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">79.82</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">77.5</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">81.1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">87.38</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">Minerva Math</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">62.06</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">66.44</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">69.64</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">74</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">DeepMind Math</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">0-shot, CoT</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">44.56</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">43.83</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">49.92</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">59.33</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Code Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">HumanEval</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">81</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">83</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">88</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">HumanEval+</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">72</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">75</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">76</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">83</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MBPP</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">72</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">73</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">80</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">84</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MBPP+</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">64</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">64</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">69</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">71</td>
</tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">CRUXEval-O</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">41.5</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">41.25</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">39.63</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">50.25</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BigCodeBench</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">39.21</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">37.9</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">41.06</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">46.23</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Tool Calling Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">BFCL v3</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">59.98</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">57.56</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">57.65</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">64.69</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Multilingual Tasks
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MULTIPLE</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">pass@1</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">49.21</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">49.46</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">55.83</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">57.37</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMMLU</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">55.14</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">55.19</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">61.87</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">69.69</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">INCLUDE</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">5-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">51.62</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">50.51</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">53.12</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">63.97</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MGSM</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">8-shot</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">28.56</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">44.48</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">45.36</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">38.72</td>
</tr>
<tr>
<td colspan="6" style="text-align:center; background-color: #FFFFFF; color: #2D2D2D; font-style:italic;">
Safety
</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">SALAD-Bench</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">97.06</td>
<td style="text-align:right; background-color:#DAE8FF; color: #2D2D2D;">96.28</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">97.77</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">97.3</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">AttaQ</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;"></td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">86.05</td>
<td style="text-align:right; background-color: #DAE8FF; color: #2D2D2D;">84.44</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">86.61</td>
<td style="text-align:right; background-color: #FFFFFF; color: #2D2D2D;">86.64</td>
</tr>
</tbody></table>
<table>
<caption><b>Multilingual Benchmarks and thr included languages:</b></caption>
<thead>
<tr>
<th style="text-align:left; background-color: #001d6c; color: white;">Benchmarks</th>
<th style="text-align:left; background-color: #001d6c; color: white;"># Langs</th>
<th style="text-align:center; background-color: #001d6c; color: white;">Languages</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MMMLU</td>
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">11</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">ar, de, en, es, fr, ja, ko, pt, zh, bn, hi</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">INCLUDE</td>
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">14</td>
<!-- <td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">hindi, bengali, tamil, telugu, arabic, german, spanish, french, italian, japanese, korean, dutch, portuguese, chinese</td> -->
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">hi, bn, ta, te, ar, de, es, fr, it, ja, ko, nl, pt, zh</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">MGSM</td>
<td style="text-align:center; background-color: #FFFFFF; color: #2D2D2D;">5</td>
<td style="text-align:left; background-color: #FFFFFF; color: #2D2D2D;">en, es, fr, ja, zh</td>
</tr>
</tbody>
</table>
**Model Architecture:**
Granite-4.0-H-Micro baseline is built on a decoder-only dense transformer architecture. Core components of this architecture are: GQA, Mamba2, MLP with SwiGLU, RMSNorm, and shared input/output embeddings.
<table>
<thead>
<tr>
<th style="text-align:left; background-color: #001d6c; color: white;">Model</th>
<th style="text-align:center; background-color: #001d6c; color: white;">Micro Dense</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Micro Dense</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Tiny MoE</th>
<th style="text-align:center; background-color: #001d6c; color: white;">H Small MoE</th>
</tr></thead>
<tbody>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Embedding size</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">2560</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">2048</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">1536</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">4096</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of layers</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">40 attention</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">4 attention / 36 Mamba2</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">4 attention / 36 Mamba2</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">4 attention / 36 Mamba2</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Attention head size</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">64</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">64</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of attention heads</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">40</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">32</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">12</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">32</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of KV heads</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">8</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">8</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">4</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">8</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Mamba2 state size</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">128</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Number of Mamba2 heads</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">64</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">48</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">MLP / Shared expert hidden size</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">8192</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">8192</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">1024</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">1536</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Num. Experts</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">-</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">64</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">72</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Num. active Experts</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">-</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">6</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">10</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Expert hidden size</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">-</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">-</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">512</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">768</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">MLP activation</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">SwiGLU</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">SwiGLU</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">SwiGLU</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">SwiGLU</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Sequence length</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128K</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">128K</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128K</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">128K</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;">Position embedding</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">RoPE</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">NoPE</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">NoPE</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">NoPE</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;"># Parameters</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">3B</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">3B</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">7B</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">32B</td>
</tr>
<tr>
<td style="text-align:left; background-color: #FFFFFF; color: black;"># Active parameters</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">3B</td>
<td style="text-align:center; background-color: #DAE8FF; color: black;">3B</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">1B</td>
<td style="text-align:center; background-color: #FFFFFF; color: black;">9B</td>
</tr>
</tbody></table>
**Training Data:**
Overall, our SFT data is largely comprised of three key sources: (1) publicly available datasets with permissive license, (2) internal synthetic data targeting specific capabilities, and (3) a select set of human-curated data.
**Infrastructure:**
We trained the Granite 4.0 Language Models utilizing an NVIDIA GB200 NVL72 cluster hosted in CoreWeave. Intra-rack communication occurs via the 72-GPU NVLink domain, and a non-blocking, full Fat-Tree NDR 400 Gb/s InfiniBand network provides inter-rack communication. This cluster provides a scalable and efficient infrastructure for training our models over thousands of GPUs.
**Ethical Considerations and Limitations:**
Granite 4.0 Instruction Models are primarily finetuned using instruction-response pairs mostly in English, but also multilingual data covering multiple languages. Although this model can handle multilingual dialog use cases, its performance might not be similar to English tasks. In such case, introducing a small number of examples (few-shot) can help the model in generating more accurate outputs. While this model has been aligned by keeping safety in consideration, the model may in some cases produce inaccurate, biased, or unsafe responses to user prompts. So we urge the community to use this model with proper safety testing and tuning tailored for their specific tasks.
**Resources**
- ⭐️ Learn about the latest updates with Granite: https://www.ibm.com/granite
- 📄 Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
- 💡 Learn about the latest Granite learning resources: https://ibm.biz/granite-learning-resources
<!-- ## Citation
```
@misc{granite-models,
author = {author 1, author2, ...},
title = {},
journal = {},
volume = {},
year = {2024},
url = {https://arxiv.org/abs/0000.00000},
}
``` -->
<!--End Original Model Card-->
---
# <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span>
Help me test my **AI-Powered Quantum Network Monitor Assistant** with **quantum-ready security checks**:
👉 [Quantum Network Monitor](https://readyforquantum.com/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme)
The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : [Source Code Quantum Network Monitor](https://github.com/Mungert69). You will also find the code I use to quantize the models if you want to do it yourself [GGUFModelBuilder](https://github.com/Mungert69/GGUFModelBuilder)
💬 **How to test**:
Choose an **AI assistant type**:
- `TurboLLM` (GPT-4.1-mini)
- `HugLLM` (Hugginface Open-source models)
- `TestLLM` (Experimental CPU-only)
### **What I’m Testing**
I’m pushing the limits of **small open-source models for AI network monitoring**, specifically:
- **Function calling** against live network services
- **How small can a model go** while still handling:
- Automated **Nmap security scans**
- **Quantum-readiness checks**
- **Network Monitoring tasks**
🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space):
- ✅ **Zero-configuration setup**
- ⏳ 30s load time (slow inference but **no API costs**) . No token limited as the cost is low.
- 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate!
### **Other Assistants**
🟢 **TurboLLM** – Uses **gpt-4.1-mini** :
- **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited.
- **Create custom cmd processors to run .net code on Quantum Network Monitor Agents**
- **Real-time network diagnostics and monitoring**
- **Security Audits**
- **Penetration testing** (Nmap/Metasploit)
🔵 **HugLLM** – Latest Open-source models:
- 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita.
### 💡 **Example commands you could test**:
1. `"Give me info on my websites SSL certificate"`
2. `"Check if my server is using quantum safe encyption for communication"`
3. `"Run a comprehensive security audit on my server"`
4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a [Quantum Network Monitor Agent](https://readyforquantum.com/Download/?utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) to run the .net code on. This is a very flexible and powerful feature. Use with caution!
### Final Word
I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful.
If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone.
I'm also open to job opportunities or sponsorship.
Thank you! 😊
|