Text Generation
GGUF
Mixture of Experts
apex
quantized
granite
mamba
hybrid
llama.cpp
imatrix
conversational
Instructions to use Myric/granite-4.0-h-tiny-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/granite-4.0-h-tiny-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/granite-4.0-h-tiny-APEX-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/granite-4.0-h-tiny-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/granite-4.0-h-tiny-APEX-GGUF
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 Myric/granite-4.0-h-tiny-APEX-GGUF # Run inference directly in the terminal: ./llama-cli -hf Myric/granite-4.0-h-tiny-APEX-GGUF
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 Myric/granite-4.0-h-tiny-APEX-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf Myric/granite-4.0-h-tiny-APEX-GGUF
Use Docker
docker model run hf.co/Myric/granite-4.0-h-tiny-APEX-GGUF
- LM Studio
- Jan
- vLLM
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Myric/granite-4.0-h-tiny-APEX-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Myric/granite-4.0-h-tiny-APEX-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Myric/granite-4.0-h-tiny-APEX-GGUF
- Ollama
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with Ollama:
ollama run hf.co/Myric/granite-4.0-h-tiny-APEX-GGUF
- Unsloth Studio
How to use Myric/granite-4.0-h-tiny-APEX-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 Myric/granite-4.0-h-tiny-APEX-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 Myric/granite-4.0-h-tiny-APEX-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Myric/granite-4.0-h-tiny-APEX-GGUF to start chatting
- Pi
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/granite-4.0-h-tiny-APEX-GGUF
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": "Myric/granite-4.0-h-tiny-APEX-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/granite-4.0-h-tiny-APEX-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Myric/granite-4.0-h-tiny-APEX-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with Docker Model Runner:
docker model run hf.co/Myric/granite-4.0-h-tiny-APEX-GGUF
- Lemonade
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Myric/granite-4.0-h-tiny-APEX-GGUF
Run and chat with the model
lemonade run user.granite-4.0-h-tiny-APEX-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Myric/granite-4.0-h-tiny-APEX-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/granite-4.0-h-tiny-APEX-GGUF
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 Myric/granite-4.0-h-tiny-APEX-GGUF
Run Hermes
hermes
- Atomic Chat
| # Vendored from localai-org/apex-quant @ a445a12 (MIT, (c) Ettore Di Giacinto). | |
| # https://github.com/localai-org/apex-quant — see NOTICE. Unmodified. | |
| #!/usr/bin/env bash | |
| # | |
| # generate_config.sh — Generate APEX tensor-type configuration files | |
| # | |
| # Creates a tensor-type file for llama-quantize's --tensor-type-file flag. | |
| # Supports any number of layers and all APEX profiles. | |
| # | |
| # Usage: | |
| # ./scripts/generate_config.sh --profile balanced --layers 40 > config.txt | |
| # ./scripts/generate_config.sh --profile mini --layers 40 -o configs/my_config.txt | |
| # ./scripts/generate_config.sh --custom --edge-exp Q6_K --mid-exp Q4_K \ | |
| # --shared Q8_0 --attn Q6_K --layers 40 > config.txt | |
| # | |
| # Profiles: | |
| # quality Q6_K/Q5_K/IQ4_XS experts, Q8_0 shared, Q6_K attn | |
| # i-quality Same as quality (use with --imatrix at quantize time) | |
| # balanced Q6_K/Q5_K experts, Q8_0 shared, Q6_K attn | |
| # i-balanced Same as balanced (use with --imatrix at quantize time) | |
| # compact Q4_K/Q3_K experts, Q6_K shared, Q4_K attn | |
| # i-compact Same as compact (use with --imatrix at quantize time) | |
| # mini Q3_K edge / IQ2_S mid experts, Q5_K/Q4_K shared, Q4_K/Q3_K attn | |
| # nano Q3_K edge / IQ2_S near / IQ2_XXS mid experts (2.06 bpw mid) — needs imatrix | |
| # micro Q3_K edge / IQ2_XS near / IQ1_M mid experts (1.75 bpw mid) — needs imatrix, experimental | |
| # custom Specify each type manually via flags | |
| # | |
| set -euo pipefail | |
| # Defaults | |
| PROFILE="" | |
| LAYERS=40 | |
| OUTPUT="" | |
| DENSE_LAYERS=0 # leading dense (non-MoE) FFN layers, e.g. LFM2-MoE | |
| # Custom mode overrides | |
| EDGE_EXP="" NEAR_EXP="" MID_EXP="" | |
| EDGE_SHARED="" MID_SHARED="" | |
| EDGE_ATTN="" MID_ATTN="" | |
| show_help() { | |
| sed -n '3,25p' "$0" | |
| exit 0 | |
| } | |
| while [ $# -gt 0 ]; do | |
| case "$1" in | |
| --profile|-p) PROFILE="$2"; shift 2 ;; | |
| --layers|-l) LAYERS="$2"; shift 2 ;; | |
| --dense-layers) DENSE_LAYERS="$2"; shift 2 ;; | |
| --output|-o) OUTPUT="$2"; shift 2 ;; | |
| --custom) PROFILE="custom"; shift ;; | |
| --edge-exp) EDGE_EXP="$2"; shift 2 ;; | |
| --near-exp) NEAR_EXP="$2"; shift 2 ;; | |
| --mid-exp) MID_EXP="$2"; shift 2 ;; | |
| --edge-shared) EDGE_SHARED="$2"; shift 2 ;; | |
| --mid-shared) MID_SHARED="$2"; shift 2 ;; | |
| --edge-attn) EDGE_ATTN="$2"; shift 2 ;; | |
| --mid-attn) MID_ATTN="$2"; shift 2 ;; | |
| --help|-h) show_help ;; | |
| *) echo "Unknown option: $1" >&2; exit 1 ;; | |
| esac | |
| done | |
| [ -z "$PROFILE" ] && { echo "Error: --profile required" >&2; exit 1; } | |
| # Edge boundaries (first/last N layers get higher precision) | |
| EDGE_HI=4 # L0..EDGE_HI | |
| EDGE_LO=$(( LAYERS - 5 )) # EDGE_LO..LAYERS-1 | |
| NEAR_HI=9 # EDGE_HI+1..NEAR_HI | |
| NEAR_LO=$(( LAYERS - 10 )) # NEAR_LO..EDGE_LO-1 | |
| # Set types per profile | |
| case "$PROFILE" in | |
| quality|i-quality) | |
| EDGE_EXP="${EDGE_EXP:-Q6_K}" | |
| NEAR_EXP="${NEAR_EXP:-Q5_K}" | |
| MID_EXP="${MID_EXP:-iq4_xs}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q8_0}" | |
| MID_SHARED="${MID_SHARED:-Q8_0}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q6_K}" | |
| MID_ATTN="${MID_ATTN:-Q6_K}" | |
| ;; | |
| balanced|i-balanced) | |
| EDGE_EXP="${EDGE_EXP:-Q6_K}" | |
| NEAR_EXP="${NEAR_EXP:-Q5_K}" | |
| MID_EXP="${MID_EXP:-Q5_K}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q8_0}" | |
| MID_SHARED="${MID_SHARED:-Q8_0}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q6_K}" | |
| MID_ATTN="${MID_ATTN:-Q6_K}" | |
| ;; | |
| compact|i-compact) | |
| EDGE_EXP="${EDGE_EXP:-Q4_K}" | |
| NEAR_EXP="${NEAR_EXP:-Q3_K}" | |
| MID_EXP="${MID_EXP:-Q3_K}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q6_K}" | |
| MID_SHARED="${MID_SHARED:-Q6_K}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q4_K}" | |
| MID_ATTN="${MID_ATTN:-Q4_K}" | |
| ;; | |
| mini) | |
| EDGE_EXP="${EDGE_EXP:-Q3_K}" | |
| NEAR_EXP="${NEAR_EXP:-Q3_K}" | |
| MID_EXP="${MID_EXP:-iq2_s}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q5_K}" | |
| MID_SHARED="${MID_SHARED:-Q4_K}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q4_K}" | |
| MID_ATTN="${MID_ATTN:-Q3_K}" | |
| ;; | |
| nano|i-nano) | |
| # APEX Nano — aggressive mid-layer routed experts at IQ2_XXS (2.06 bpw) | |
| # Target: ~25-30% smaller than Mini at modest quality cost. Requires imatrix. | |
| EDGE_EXP="${EDGE_EXP:-Q3_K}" | |
| NEAR_EXP="${NEAR_EXP:-iq2_s}" | |
| MID_EXP="${MID_EXP:-iq2_xxs}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q5_K}" | |
| MID_SHARED="${MID_SHARED:-Q4_K}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q4_K}" | |
| MID_ATTN="${MID_ATTN:-Q3_K}" | |
| ;; | |
| micro|i-micro) | |
| # APEX Micro — extreme mid-layer routed experts at IQ1_M (1.75 bpw) | |
| # Only viable on MoE: sparse expert activation + shared expert kept high-precision | |
| # softens per-token error. Quality drop expected — experimental tier. Requires imatrix. | |
| EDGE_EXP="${EDGE_EXP:-Q3_K}" | |
| NEAR_EXP="${NEAR_EXP:-iq2_xs}" | |
| MID_EXP="${MID_EXP:-iq1_m}" | |
| EDGE_SHARED="${EDGE_SHARED:-Q5_K}" | |
| MID_SHARED="${MID_SHARED:-Q4_K}" | |
| EDGE_ATTN="${EDGE_ATTN:-Q4_K}" | |
| MID_ATTN="${MID_ATTN:-Q3_K}" | |
| ;; | |
| custom) | |
| [ -z "$EDGE_EXP" ] && { echo "Error: --custom requires --edge-exp" >&2; exit 1; } | |
| [ -z "$MID_EXP" ] && MID_EXP="$EDGE_EXP" | |
| [ -z "$NEAR_EXP" ] && NEAR_EXP="$EDGE_EXP" | |
| [ -z "$EDGE_SHARED" ] && EDGE_SHARED="Q8_0" | |
| [ -z "$MID_SHARED" ] && MID_SHARED="$EDGE_SHARED" | |
| [ -z "$EDGE_ATTN" ] && EDGE_ATTN="Q6_K" | |
| [ -z "$MID_ATTN" ] && MID_ATTN="$EDGE_ATTN" | |
| ;; | |
| *) | |
| echo "Error: unknown profile '$PROFILE'" >&2 | |
| echo "Available: quality, i-quality, balanced, i-balanced, compact, i-compact, mini, nano, i-nano, micro, i-micro, custom" >&2 | |
| exit 1 | |
| ;; | |
| esac | |
| # Generate config | |
| generate() { | |
| for (( i=0; i<LAYERS; i++ )); do | |
| # Expert type based on layer position | |
| if (( i <= EDGE_HI || i >= EDGE_LO )); then | |
| exp_type="$EDGE_EXP" | |
| elif (( i <= NEAR_HI || i >= NEAR_LO )); then | |
| exp_type="$NEAR_EXP" | |
| else | |
| exp_type="$MID_EXP" | |
| fi | |
| # Shared type based on layer position | |
| if (( i <= EDGE_HI || i >= EDGE_LO )); then | |
| shared_type="$EDGE_SHARED" | |
| else | |
| shared_type="$MID_SHARED" | |
| fi | |
| # Attention type based on layer position | |
| if (( i <= 2 || i >= LAYERS - 3 )); then | |
| attn_type="$EDGE_ATTN" | |
| else | |
| attn_type="$MID_ATTN" | |
| fi | |
| if (( i < DENSE_LAYERS )); then | |
| # Leading dense (non-MoE) FFN layers — keep at shared (edge) precision. | |
| # ".weight" suffix prevents the regex from also matching ffn_*_exps/ffn_gate_inp. | |
| echo "blk.${i}.ffn_gate.weight=${shared_type}" | |
| echo "blk.${i}.ffn_up.weight=${shared_type}" | |
| echo "blk.${i}.ffn_down.weight=${shared_type}" | |
| else | |
| # Routed expert tensors (dominant cost in MoE) | |
| echo "blk.${i}.ffn_gate_exps=${exp_type}" | |
| echo "blk.${i}.ffn_up_exps=${exp_type}" | |
| echo "blk.${i}.ffn_down_exps=${exp_type}" | |
| fi | |
| # Shared expert tensors (archs with shared experts, e.g. Qwen3-MoE) | |
| echo "blk.${i}.ffn_gate_shexp=${shared_type}" | |
| echo "blk.${i}.ffn_up_shexp=${shared_type}" | |
| echo "blk.${i}.ffn_down_shexp=${shared_type}" | |
| # Attention tensors (attention layers) | |
| echo "blk.${i}.attn_q=${attn_type}" | |
| echo "blk.${i}.attn_k=${attn_type}" | |
| echo "blk.${i}.attn_v=${attn_type}" | |
| echo "blk.${i}.attn_output=${attn_type}" | |
| echo "blk.${i}.attn_gate=${attn_type}" | |
| echo "blk.${i}.attn_qkv=${attn_type}" | |
| # Short-convolution mixing tensors (LFM2 conv layers — attention-equivalent) | |
| echo "blk.${i}.shortconv.in_proj=${attn_type}" | |
| echo "blk.${i}.shortconv.out_proj=${attn_type}" | |
| # SSM tensors (Mamba/hybrid archs) | |
| echo "blk.${i}.ssm_alpha=${attn_type}" | |
| echo "blk.${i}.ssm_beta=${attn_type}" | |
| echo "blk.${i}.ssm_out=${attn_type}" | |
| done | |
| } | |
| if [ -n "$OUTPUT" ]; then | |
| generate > "$OUTPUT" | |
| echo "Config written to: $OUTPUT ($(wc -l < "$OUTPUT") lines, $LAYERS layers)" >&2 | |
| else | |
| generate | |
| fi | |