{"id":51317069,"url":"https://github.com/blockfeed/llama.cpp-hip-gemma4-mtp","last_synced_at":"2026-07-01T08:31:22.356Z","repository":{"id":361014916,"uuid":"1252725069","full_name":"blockfeed/llama.cpp-hip-gemma4-mtp","owner":"blockfeed","description":"Arch Linux PKGBUILD for llama.cpp with ROCm/HIP + Gemma 4 MTP (PR #23398)","archived":false,"fork":false,"pushed_at":"2026-05-28T20:10:01.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T22:07:19.444Z","etag":null,"topics":["arch-linux","gemma4","gguf","hip","llama-cpp","multi-token-prediction","pkgbuild","rocm"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockfeed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T20:04:59.000Z","updated_at":"2026-05-28T20:12:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/blockfeed/llama.cpp-hip-gemma4-mtp","commit_stats":null,"previous_names":["blockfeed/llama.cpp-hip-gemma4-mtp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/blockfeed/llama.cpp-hip-gemma4-mtp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfeed%2Fllama.cpp-hip-gemma4-mtp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfeed%2Fllama.cpp-hip-gemma4-mtp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfeed%2Fllama.cpp-hip-gemma4-mtp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfeed%2Fllama.cpp-hip-gemma4-mtp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockfeed","download_url":"https://codeload.github.com/blockfeed/llama.cpp-hip-gemma4-mtp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockfeed%2Fllama.cpp-hip-gemma4-mtp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34999791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch-linux","gemma4","gguf","hip","llama-cpp","multi-token-prediction","pkgbuild","rocm"],"created_at":"2026-07-01T08:31:18.480Z","updated_at":"2026-07-01T08:31:22.350Z","avatar_url":"https://github.com/blockfeed.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llama.cpp-hip-gemma4-mtp\n\n\u003e **ARCHIVED — No longer required.**\n\u003e\n\u003e [PR #23398](https://github.com/ggml-org/llama.cpp/pull/23398) was merged into\n\u003e ggml-org/llama.cpp on **June 7, 2026** (build b9549). Native Gemma 4 MTP\n\u003e support ships in `llama.cpp-hip` \u003e= b9553. This package is no longer needed —\n\u003e use the standard\n\u003e [llama.cpp-hip](https://aur.archlinux.org/packages/llama.cpp-hip) AUR package.\n\u003e\n\u003e This repository is archived and read-only.\n\n---\n\nArch Linux PKGBUILD for llama.cpp with AMD ROCm/HIP optimizations,\npatched with [PR #23398](https://github.com/ggml-org/llama.cpp/pull/23398)\nfor Gemma 4 MTP support. Pinned to tag `b9378`.\n\n**Binary-only addon** for the main `llama.cpp-hip` package. Installs only\n`llama-server` + runtime shared libs to `/opt/llama.cpp-gemma4-mtp/`.\nIntended as a `llama_server_path` target in llama-swap for Gemma 4 MTP\nmodel slots. Coexists with `llama.cpp-hip` — no path conflicts.\n\nAdds the `GEMMA4_ASSISTANT` model architecture for multi-token prediction\nspeculative decoding, including KV cache sharing between trunk and draft\ncontexts, pre/post projection layers, and automatic device placement\nvalidation. The draft model reads trunk KV read-only and requires no\ndedicated KV cache of its own.\n\nBased on AUR [llama.cpp-hip](https://aur.archlinux.org/packages/llama.cpp-hip)\nby Orion-zhen.\n\n**Arch Linux only.**\n\n**License:** GPLv3. See [LICENSE](LICENSE). The upstream `llama.cpp` is MIT-licensed; this PKGBUILD/patch collection is distributed under GPLv3.\n\n**Dependencies:** `hip-runtime-amd`, `hipblas`, `rocblas`, `rocm-hip-sdk`.\n\n**CI targets:** gfx906, gfx1010, gfx1030, gfx1031, gfx1100, gfx1101, gfx1102,\ngfx1151, gfx1200, gfx1201. Local builds auto-detect the host GPU.\n\n**llama-swap config:**\n```yaml\n# Gemma 4 MTP model slot\n- name: gemma4-mtp\n  llama_server_path: /opt/llama.cpp-gemma4-mtp/bin/llama-server\n  model: /path/to/gemma-4-26b-a4b-mtp.gguf\n  model_draft: /path/to/gemma-4-draft.gguf\n  ...\n```\n\n## Known Bug (historical — fixed in upstream b9549+)\n\n**Qwen MTP models crash at startup.** The patched binary added device-memory\nreporting that calls `memory_breakdown()` during startup. For Qwen's\ninternal-heads MTP (`--spec-type draft-mtp` without `--model-draft`), the\ndraft context's backend scheduler is null at that point — assertion fires,\nprocess aborts:\n\n```\nggml-backend.cpp:1945: GGML_ASSERT(sched) failed\n  → ggml_backend_sched_get_buffer_type()\n  → llama_context::memory_breakdown()\n  → common_get_device_memory_data()\n```\n\nGemma 4 works because it provides `--model-draft`, which takes a different\ninitialization path.\n\n**Only Gemma 4 MTP models work with this build.** Use the main `llama.cpp-hip`\npackage for all other models. This bug does not affect the upstream merge.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfeed%2Fllama.cpp-hip-gemma4-mtp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockfeed%2Fllama.cpp-hip-gemma4-mtp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockfeed%2Fllama.cpp-hip-gemma4-mtp/lists"}