Instructions to use Mario867/Inkling_2_mini_for_older_hardware 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 Mario867/Inkling_2_mini_for_older_hardware 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 Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL # Run inference directly in the terminal: llama cli -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL # Run inference directly in the terminal: llama cli -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL # Run inference directly in the terminal: ./build/bin/llama cli -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Use Docker
docker model run hf.co/Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
- Llama new
- LM Studio
- Jan
- Ollama
How to use Mario867/Inkling_2_mini_for_older_hardware with Ollama:
ollama run hf.co/Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
- Unsloth Desktop
- Pi
How to use Mario867/Inkling_2_mini_for_older_hardware with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Mario867/Inkling_2_mini_for_older_hardware with Docker Model Runner:
docker model run hf.co/Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
- Lemonade
How to use Mario867/Inkling_2_mini_for_older_hardware with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Run and chat with the model
lemonade run user.Inkling_2_mini_for_older_hardware-UD-Q3_K_XL
List all available models
lemonade list
- Hermes Agent
How to use Mario867/Inkling_2_mini_for_older_hardware with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
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:9931/v1 hermes config set model.default Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Mario867/Inkling_2_mini_for_older_hardware with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL
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:9931/v1 \ --custom-model-id "Mario867/Inkling_2_mini_for_older_hardware:UD-Q3_K_XL" \ --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"
Inkling-2-Mini-UD-Q3_K_XL β Q4 Repack (NVFP4 $\rightarrow$ Q4_K / Q4_0)
Model Overview
- Base Model:
Inkling-2-Mini-UD-Q3_K_XL(GGUF v3,13,631,779,296bytes / ~12.70 GiB) - Modification Type: Size-neutral, in-place quantization repack (
NVFP4$\rightarrow$Q4_K/Q4_0) usingggml_quantize_chunk()vialibggml-base.so.1 - Target Hardware: GPUs lacking native OCP FP4 (
device->ocp_fp4 == 0) or BF16 accumulation supportβspecifically AMD Polaris (e.g., Radeon RX 580) and older NVIDIA GPUs (e.g., Tesla / pre-Ada cards) runningllama.cpp/ Vulkan - File Size & Layout: Byte-identical to the source GGUF (
13,631,779,296bytes); all tensor offsets, padding, metadata, and non-NVFP4 tensors remain completely untouched
Why This Repack Exists
On GPUs without native OCP FP4 hardware support (fp4: 0), llama.cpp falls back to software-side emulation for GGML_TYPE_NVFP4 tensors:
- Shared-Memory LUT Staging: In
ggml-vulkan.cpp,if (src0_type == GGML_TYPE_NVFP4 && !device->ocp_fp4)stages a 256-entry lookup table in shared memory to decode FP4 weights. - Forced BF16 Accumulation: In
llama-graph.cpp,if (w->type == GGML_TYPE_NVFP4) ggml_prec_set_acc(res, GGML_PREC_BF16)forces BF16 accumulation on every NVFP4 matmul, triggering a second software fallback on devices withbf16: 0.
Rewriting the 32 NVFP4 MoE expert tensors into Q4_K and Q4_0 preserves the exact 4.5 bits per weight ($\frac{9}{16}$ byte/element) density while routing those tensors through standard, first-class llama.cpp and Vulkan kernels.
Quantization & Layout Design
NVFP4, Q4_K, and Q4_0 all use $\frac{9}{16}$ bytes (0.5625 B) per weight:
| Format | Block Structure | Bytes per Element | Row Width Requirement |
|---|---|---|---|
NVFP4 (source) |
36 B / 64 weights | $\frac{9}{16}$ (0.5625 B) | ne0 % 64 == 0 |
Q4_K (target) |
144 B / 256 weights | $\frac{9}{16}$ (0.5625 B) | ne0 % 256 == 0 |
Q4_0 (target) |
18 B / 32 weights | $\frac{9}{16}$ (0.5625 B) | ne0 % 32 == 0 |
Per-Tensor Target Selection
Because blk.N.ffn_down_exps.weight has a row width of 1152 and $1152 \pmod{256} = 128$, Q4_K cannot represent those rows without altering tensor dimensions or file layout. The conversion script selects targets per tensor:
ne0 % 256 == 0$\rightarrow$Q4_K: Applied toffn_gate_up_exps.weight(ne0 = 2304,1296 B/row), providing 6-bit sub-block scales.- Otherwise $\rightarrow$
Q4_0: Applied toffn_down_exps.weight(ne0 = 1152,648 B/row), keeping row byte sizes and file offsets identical.
Preserved Scale Arithmetic
- The 40 per-expert
*.scaletensors are left untouched. - In
llama-graph.cpp(build_lora_mm), expert scales multiply the matmul output (res = ggml_mul(ctx0, res, w_s)), not the stored weights directly. Keeping dequantized weight magnitudes at their original scale ($\approx \pm 1440$) preserves the downstream arithmetic.
Conversion Summary & Verification
Tensor Breakdown (Inkling-2-Mini-UD-Q3_K_XL.gguf $\rightarrow$ .q4.gguf)
Converted across 32 expert tensors in 165 seconds (~49 MiB/s across 6 threads):
| Metric / Tensor Type | Before | After |
|---|---|---|
NVFP4 tensors |
32 tensors (7.83 GiB) | 0 tensors |
Q4_K tensors |
3 | 15 (12 converted) |
Q4_0 tensors |
0 | 20 (converted) |
| Total file size | 13,631,779,296 bytes |
13,631,779,296 bytes |
| Tensor offsets & padding | Baseline | All identical |
Pre-Conversion Validation
- NVFP4 Dequantization Parity: Vectorized NumPy UE4M3 + E2M1 dequantization matched
ggml'sdequantize_row_nvfp4viactypeswith0.000e+00max absolute difference across 5 random buffers. - Synthetic Round-Trip SNR:
21.3 dBforQ4_0(ne0 = 1152) and23.0 dBforQ4_K(ne0 = 2304). - Row-Size Neutrality:
648 B/row$\rightarrow$648 B/row(ne0 = 1152) and1296 B/row$\rightarrow$1296 B/row(ne0 = 2304).
Real-Weight Fidelity (512 Rows per Sampled Tensor vs. Decoded Source NVFP4)
| Tensor | Target Type | Signal RMS | Error RMS | SNR |
|---|---|---|---|---|
blk.6.ffn_gate_up_exps.weight |
q4_K |
483.12 |
33.80 |
23.10 dB |
blk.11.ffn_gate_up_exps.weight |
q4_K |
219.06 |
15.41 |
23.06 dB |
blk.6.ffn_down_exps.weight |
q4_0 |
485.03 |
41.81 |
21.29 dB |
blk.11.ffn_down_exps.weight |
q4_0 |
170.03 |
14.93 |
21.13 dB |
- Untouched Tensor Check: Confirmed byte-identical across
output.weight,blk.0.attn_q.weight,token_embd.weight, andblk.11.ffn_down_exps.scale.
Usage & Reproduction
Running with llama.cpp
Verify that NVFP4 tensors are eliminated at load time:
llama-server -m Inkling-2-Mini-UD-Q3_K_XL.q4.gguf -lv 4 ... 2>&1 | grep -- '- type'
Expected output includes nvfp4: 0, q4_K: 15, and q4_0: 20.
Reproducing the Conversion (nvfp4_to_q4.py)
The conversion script requires only Python 3, numpy, and an existing libggml-base.so.1 build:
# Run built-in self-tests
python3 nvfp4_to_q4.py --selftest
# Inspect NVFP4 tensors and target mapping
python3 nvfp4_to_q4.py --list -i Inkling-2-Mini-UD-Q3_K_XL.gguf
# Perform size-neutral conversion
python3 nvfp4_to_q4.py -i Inkling-2-Mini-UD-Q3_K_XL.gguf -o Inkling-2-Mini-UD-Q3_K_XL.q4.gguf
(On NixOS / Nix environments, invoke via nix-shell -p python3Packages.numpy --run "...".)
Limitations & Caveats
- Second-Generation 4-Bit Quantization: Repacking already-quantized
NVFP4weights intoQ4_K/Q4_0introduces one additional generation of 4-bit quantization error (~21β23 dB SNR relative to the decodedNVFP4weights), isolated to the MoE expert layers. Q4_0on1152-Wide Down Projections:Q4_0(~21.1β21.3 dB SNR) is used forffn_down_exps.weightto preserve exact byte offsets without relayout. Higher-precision formats (such asQ5_0orQ6_K) would require shifting tensor offsets and increasing file size.- Memory Footprint Unchanged: Because this repack is strictly size-neutral (~12.70 GiB total file size), VRAM capacity and CPU/RAM offload requirements remain identical to the base file.
- Downloads last month
- -
3-bit