8000 GitHub - kanten2/llama.cpp-inkling-rdna3: Inkling 2 Mini decode optimizations and reproducible benchmarks for the Radeon RX 7900 XTX on Windows ROCm. · GitHub
[go: up one dir, main page]

Skip to content

About

Inkling 2 Mini decode optimizations and reproducible benchmarks for the Radeon RX 7900 XTX on Windows ROCm.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inkling 2 Mini on Windows ROCm

English · 日本語 · 简体中文 · 繁體中文

Download v0.2.3 for Windows · Windows x64 · Radeon RX 7900 XTX

Run Inkling 2 Mini locally with a bundled ROCm runtime. Normal decode remains the default, and DFlash 2 is optional.

v0.2.3 performance

Inkling 2 Mini v0.2.3 on RX 7900 XTX and Windows 11. Compared with v0.2.2, DFlash 2 decode throughput was 5.67% higher, and prefill throughput at 16,384 input tokens was 10.71% higher with DFlash 2 off.

DFlash 2 decode rose from 167.99 to 177.54 tok/s. With DFlash 2 off, 16,384-token prefill rose from 1,400.0 to 1,549.5 tok/s. Speeds are medians across server launches. Gains are medians of paired speed ratios.

In paired tests with UD-Q4_K_M, both versions passed 288/288 scored Python and Japanese generations with DFlash 2 enabled, with identical token IDs in all 288 pairs. The optimized paths can produce different outputs from v0.2.2 under other conditions. Measurement details, output samples and download

v0.2.2: DFlash 2 (optional)

Inkling 2 Mini v0.2.2: passing-generation medians, normal decode 50.97 and DFlash 2 164.76 tok/s; 24/24 passed per mode on RX 7900 XTX / Windows 11.

On the scored tasks below, DFlash 2 delivered about 3.2 times the decode throughput (median of passing generations: 50.97 → 164.76 tok/s, ratio of the two mode medians). Normal decode remains the default.

  • Enable: DFlash 2 works in the published Windows ZIP; a source build is not required. Extract the whole ZIP, stop any running server, and run the PowerShell command below. Supply your own target GGUF and compatible Inkling 2 Mini DFlash 2 Q8_0 draft. Dragging a model onto chat.cmd does not enable DFlash 2.
  • Disable: stop the server and restart with --spec-type none, removing every --spec-draft-* argument.
# Run from the fully extracted ZIP folder; replace the model paths.
Set-Location .\runtime\bin
$env:INKLING_PP_FUSE = '1'
$env:GGML_HIP_IQ4_GATE4 = '1'
$env:GGML_HIP_DISABLE_SCALE_ADD_FUSION = '1'
.\llama-server.exe -m "C:\models\Inkling-2-Mini-UD-Q4_K_M.gguf" `
    --spec-type draft-dflash2 --spec-draft-model "C:\models\Inkling-2-Mini-DFlash2-Draft-Q8_0.gguf" `
    --spec-draft-n-max 7 --spec-draft-n-min 0 --spec-draft-device ROCm0 --spec-draft-ngl 99 `
    --device ROCm0 -ngl 99 -c 5120 -b 512 -ub 512 -np 1 -ctk f16 -ctv f16 -fa on `
    --no-warmup --host 127.0.0.1 --port 8080 --offline

Download the draft model

Download Inkling-2-Mini-DFlash2-Draft-Q8_0.gguf (about 538 MB) from maternion/Inkling-2-Mini-DFlash2-GGUF. The link pins revision 99bde2f1a9da85b636037de946040c4c98623f08, the same file used in the measurements. Save it separately and use its path for --spec-draft-model.

SHA-256: fb1401ea63549d7f669d2b7a676ef364b09b6866464478d9303e333631a7b168. Check a downloaded file with Get-FileHash -Algorithm SHA256 "C:\models\Inkling-2-Mini-DFlash2-Draft-Q8_0.gguf".

This is a third-party quantization, not a model made or redistributed by this fork. The publisher's model card declares Apache-2.0; follow the publisher's license and attribution terms. The target model is a separate download. The Windows ZIP contains neither model.

Environment variables in the command

Variable Purpose and requirement
INKLING_PP_FUSE=1 Enables Inkling prefill bias/mask fusion; optional for startup, set to 1 to reproduce the measured configuration.
GGML_HIP_IQ4_GATE4=1 Selects the four-wave IQ4_NL gate/up path; optional and inactive for this UD-Q4_K_M measurement, retained only to match the original environment.
GGML_HIP_DISABLE_SCALE_ADD_FUSION=1 Disables SCALE+ADD fusion and uses separate operations; not required to start DFlash 2, but keep 1 to reproduce the published arithmetic configuration.

The four scored normal/DFlash 2 run logs contain zero IQ4_NL gate/up: using 4 waves activation messages, while all four report prefill fusion. The implementation restricts gate4 to GGML_TYPE_IQ4_NL; the setting is not the cause of the UD-Q4_K_M result. Gate4 condition

PowerShell settings and connection

$env: settings apply to the current PowerShell and child processes. Starting chat.cmd from the same window inherits them, but its launcher explicitly sets gate4 and disable-scale-add to 1 and only supplies INKLING_PP_FUSE=1 when that variable is absent. An existing INKLING_PP_FUSE=0, for example, carries through. A fresh PowerShell opened independently from the Start menu returns to the launcher's standard settings; starting another pwsh from the modified shell still inherits its environment. These commands do not persist settings in the user/system environment.

After the command reports that it is listening, open http://127.0.0.1:8080 in your browser. This is a local-only address. If you change --port, use that port in the URL. chat.cmd opens its own browser automatically.

Performance depends on the content

DFlash 2's benefit depends on how many draft tokens the target accepts. Conversational prose may benefit less than code. The published code/structured-Japanese tasks do not establish conversational throughput; about 3.2× is not a promise for every prompt.

Measurement conditions

  • GPU / OS: AMD Radeon RX 7900 XTX, Windows 11, normal clocks.
  • Model: Inkling-2-Mini-UD-Q4_K_M; Q8_0 DFlash 2 draft, maximum width 7.
  • Tasks: 12 scored Python/Japanese cases × 2 runs per mode; both modes passed 24/24.
  • Inputs: approximately 500 / 4,100 tokens (actual 469–506 / 4,059–4,094). Output limit 512 tokens; outputs 58–294 tokens, natural EOS.
  • Settings: Batch 1, greedy, context 5,120, F16 KV, Flash Attention on, prefill batch/ubatch 512.
  • Response format: numeric reasoning_effort=0 in the GGUF chat template plus the explicit assistant text header <|message_model|><|content_text|>, so the benchmark requested final text without a thinking channel. reasoning_effort=0 alone is not asserted to disable thinking.
  • Aggregation: wrong or length-limited answers are excluded from throughput but retained in pass-rate denominators. Two blocks alternated execution order.

The command above starts the server. Output limit, greedy sampling and response format were specified in benchmark requests. Python functions passed six tests each; Japanese answers were checked against expected JSON. Prompts, outputs and timings

These figures cover decode on the specified tasks, not prompt processing, reasoning-enabled requests or long outputs. They are not directly comparable to the older tg768 result of 56.67 tok/s. The separate 1,024-token output-limit diagnostic was not part of this speed measurement.

Known issue

Enabling DFlash 2 can produce output that differs in part from normal decode because of computation-order differences. All 24 paired outputs matched token IDs here, but divergence was observed on long inputs. Disable DFlash 2 when identical output to normal decode is required.

Start with the Windows ZIP

  1. Download inkling-rdna3-windows-gfx1100.zip and select Extract All. ZIP SHA-256
  2. Supply a compatible Inkling 2 Mini text GGUF. Models are not bundled. IQ4_NL · Unsloth Mainline_Support UD-Q4_K_M
  3. Drag the GGUF onto chat.cmd to open local chat. This uses normal decode by default. Keep the console open; stop it with Ctrl+C.

The ZIP includes ROCm libraries. A compatible AMD driver and Visual C++ x64 runtime are required. For Unsloth files ending in .gguf_file, rename the extension to .gguf.

Build from source

For source builds of this release, check out tag v0.2.2 and follow its build guide. This README update does not merge release implementation changes into main. Release notes · Package hash comparison and extracted-package smoke test

Earlier benchmarks (v0.2.1 / prefill / b12606)

v0.2.1 · Windows x64 · Radeon RX 7900 XTX. Long-prompt WMMA Attention is included and defaults to off.

Inkling 2 Mini v0.2.0 / v0.2.1 · RX 7900 XTX

IQ4_NL, 16,384 input tokens and 1,000 generated tokens. Each configuration ran the same two prompts once each. Values are means of warm requests.

Mode Prefill (tok/s) Decode (tok/s) Request (s)
v0.2.0 1,334.74 50.27 32.17
v0.2.1 (Default) 1,405.37 50.11 31.61
v0.2.1 (WMMA) 1,536.54 50.20 30.59

On RX 7900 XTX with Windows ROCm, default prefill throughput improved 5.29% over v0.2.0. Mean request time fell 1.76%. Both default runs matched all 1,000 generated tokens from v0.2.0. Opt-in WMMA can change greedy outputs. 16K benchmark

To enable WMMA, run these commands in PowerShell from the extracted ZIP folder. A fresh shell uses the defaults.

$env:INKLING_ATTN_DIRECT = '1'
$env:INKLING_ATTN_WMMA = '1'
.\chat.cmd "C:\models\Inkling-2-Mini-IQ4_NL.gguf"

ZIP and source build guides · English · 日本語 · 简体中文 · 繁體中文

What the fork optimizes

During prefill, the GPU reads the prompt before generating its answer. This fork copies Inkling's relative-position bias values directly into the layout needed for attention, saving an intermediate copy. During generation, it combines GPU operations for row clipping and convolution and reuses results shared by multiple layers. For IQ4_NL, the ZIP also enables a four-wave GPU kernel for the routed experts' gate and up projections. Optimization and profiling notes

Measured results

Prompt processing (prefill)

The chart compares fusion off and on within the same build for each GGUF. Input throughput increased 36.9% for IQ4_NL and 33.5% for UD-Q4_K_M at 16,384 tokens. At 4,096 tokens the gains were 11.6% and 10.7%, respectively. Raw timings, answer checks and reproduction steps

16,384-token input throughput in tokens/s, fusion off to on. IQ4_NL 884.48 to 1,210.57. UD-Q4_K_M 883.90 to 1,179.72.

Token generation (decode)

The earlier IQ4_NL decode benchmark compares the official b12606 distribution with the fork's eight- and four-wave modes. Values below are five-run means in tokens/s, with HIP Graphs enabled. The pp512 row was measured before the prefill change.

IQ4_NL generation speed at tg768 in tokens/s. Official b12606 46.55, optimized eight waves 53.34, optimized four waves 54.53.

Workload Official b12606 Optimized, 8 waves Optimized, 4 waves
Process a 512-token prompt (pp512) 1,557.49 1,557.21 1,556.51
Generate 128 tokens (tg128) 46.00 52.94 54.16
Generate 768 tokens (tg768) 46.55 53.34 54.53

Benchmark commands, raw JSON and standard deviations

Answer checks. Both optimized modes answered 25/25 Japanese questions correctly. Each question ran once per mode. Completing all 25 answers took 430.55 s with eight waves and 365.76 s with four. The four-wave run generated 13.3% fewer tokens, which also contributed to the shorter time. Questions, recorded answers and grading instructions

Unsloth Mainline_Support UD-Q4_K_M. On the same GPU, tg768 rose from 48.63 to 56.67 tokens/s (+16.54%) with the default optimizations. All three builds in this comparison included the upstream looped expert-scale fix (#32704) and scored 5/5 on the answer checks. This GGUF uses a different weight format for the gate and up projections. Logs showed zero four-wave kernel activations in the five runs with the option enabled. UD-Q4_K_M benchmark, kernel logs and reproduction steps

Use the Windows ZIP

You need Windows x64, a Radeon RX 7900 XTX with a compatible AMD driver, and the Visual C++ x64 runtime. The ZIP includes the ROCm runtime. Microsoft Visual C++ x64 runtime

  1. Download inkling-rdna3-windows-gfx1100.zip and choose Extract All in Explorer. The release also includes the ZIP's SHA-256 checksum. Download v0.2.1 for Windows
  2. Download a compatible Inkling 2 Mini text model separately. For the Unsloth version, choose the file in Mainline_Support and rename its extension from .gguf_file to .gguf. IQ4_NL model · Unsloth UD-Q4_K_M model
  3. Drag the GGUF onto chat.cmd. Once the model loads, your default browser opens a local text chat with a 4,096-token context. Keep the console open while chatting.
  4. To check speed, press Ctrl+C in the chat console to stop the server, then drag the same GGUF onto bench.cmd. It prints the GPU name and the speed of one timed 768-token generation after warm-up.

Both launchers use your Windows display language. The four guides above cover language selection and building the ZIP from source.

About the upstream llama.cpp project

This fork is based on ggml-org's llama.cpp b12606. The following resources belong to the original project.

  • Tools and development. The upstream documentation covers the CLI, server, Docker, Android, multi-GPU setups and other platforms. Upstream documentation index
  • Contributing to ggml-org/llama.cpp. The original maintainers explain how they review pull requests and grant roles in their repository. Upstream contributing guide
  • Acknowledgements and licenses. The original project credits the libraries used by llama.cpp. The Windows ZIP includes third-party notices in its licenses/ folder. Upstream acknowledgements · llama.cpp license

About

Inkling 2 Mini decode optimizations and reproducible benchmarks for the Radeon RX 7900 XTX on Windows ROCm.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0