# tetherto/qvac-fabric-llm.cpp — AlpLab Radar Static Code Audit

- Ring: `adopt`
- Category: `ai-models`
- Overall score: `4.1/5`
- Implementation check: `verified`
- Maturity: `active`
- Audited commit: `11f99e64ddda` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-01T20:26:55Z
- Repository: https://github.com/tetherto/qvac-fabric-llm.cpp
- Radar entry: https://radar.alplab.co/#repo/tetherto/qvac-fabric-llm.cpp
- License: `MIT`
- CI workflows: `.github/workflows`
- Tags: `llama.cpp`, `inference`, `vector-search`, `lora-finetuning`, `npu`, `quantization`

## Summary

A maintained llama.cpp fork (MIT, releases since 2026-03) that adds a standalone TurboVec vector-search library, RDMA/direct-allreduce RPC cluster inference, cross-backend LoRA fine-tuning, TurboQuant KV-cache quantization, an AMD XDNA2 NPU backend, and Apple Neural Engine Core ML sidecars on top of upstream b10796.

## Implementation Check

Every README feature maps to real code read in this tree — 'TurboVec / Local Vector Search' is the opt-in ggml-vector-index library (ggml/src/ggml-vector-index.cpp, GGML_VECTOR_INDEX=OFF default in ggml/CMakeLists.txt), LoRA training is src/llama-lora-training.cpp plus the llama_opt_* C API in include/llama.h, XDNA is ~300KB of ggml/src/ggml-xdna/ plus IRON kernels — though the X post's '2x-8.2x faster' figure is a benchmark claim no static read can confirm.

## When to Use

Use it when you need upstream llama.cpp inference plus on-device RAG vector search, multi-host RPC with RDMA and butterfly all-reduce, on-device LoRA fine-tuning (incl. iOS via FinetuneBridge.mm), or NPU/ANE acceleration; use upstream llama.cpp instead if you need stock wire-compatible RPC peers (this fork deliberately runs protocol 113 in a downstream namespace) or want the vector index wired into llama-server (it is standalone and not integrated).

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 5.0/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 3.5/5 |
| integration | 4.5/5 |

## Code Evidence

ggml/include/ggml-vector-index.h declares a full C API (ggml_vec_index_create_turbovec with 2/3/4-bit modes, ggml_vec_index_search/_filtered/_ivf, mmap load, v4 .tvid delta logs, turbovec v8 snapshots) and ggml/src/ggml-vector-index.cpp implements atomic duplicate-checked adds (ggml_vec_index_add_unlocked with rollback_appended_slots_unlocked), turbovec swap-remove matching upstream, and calibration re-encoding; tests/CMakeLists.txt registers test-vector-index (built with -fno-fast-math -ffp-contract=off against bit-exact golden fixtures), test-vector-index-faults, and RPC allreduce tests over 2/4/8 ranks in f32/bf16; ggml/include/ggml-rpc.h sets RPC_PROTO_MAJOR_VERSION 113 with static_assert(GGML_OP_COUNT == 127) and documents the deliberate wire divergence; ggml/src/ggml-rpc/ibv-drv.cpp dlopens libibverbs.so.1 at runtime and .github/workflows/build-rpc.yml verifies (nm/readelf) that no ibv symbols leak into the shared backend and that servers run with and without libibverbs; src/llama-lora-training.cpp builds per-expert 3D LoRA pairs (llama_lora_create_tensor_pair) and checkpoint save (llama_lora_save_checkpoint); ggml/src/ggml-xdna/ggml-xdna.cpp implements fused decode-layer planning (xdna_tail_scan, xdna_rec_session) with design-tagged artifact lookup (xdna_fused_xclbin) and OpenMP host-glue fast paths (xdna_concat_fast, xdna_ssm_conv_fast), with provenance and licenses documented in ggml/src/ggml-xdna/README.md and THIRD_PARTY_NOTICES; ggml/src/ggml-tbq-quants.c implements the TurboQuant Walsh-Hadamard rotation with tests wired via test-tbq-init; top-level CMakeLists.txt gates LLAMA_COREML to Apple platforms with sidecar sources in src/llama-coreml-ffn.mm and examples/embedding-coreml/.

## Issues Found

248 unpinned GitHub Actions refs across the 60+ workflows in .github/workflows (supply-chain hygiene risk for the repo's own CI); SECURITY.md still routes disclosure through upstream ggml-org language and states the private disclosure program is disabled; RPC and the butterfly communicator are unauthenticated by design (inherited upstream limitation, loudly warned in tools/rpc/rpc-server.cpp).

## Key Risks

Nothing was executed: test existence and CI wiring were read, not run, and all performance figures (TurboVec speedups, NPU tok/s, Core ML prefill gains) are documented claims not verifiable statically; the vector index is standalone and not integrated into the llama runtime or server; XDNA needs Linux + XRT 2.25.x + mlir-aie 1.4.3 with no runtime version check; the fork's RPC wire protocol is incompatible with stock llama.cpp peers by design; the direct all-reduce communicator and RPC carry no transport authentication or encryption (trusted private networks only, documented in tools/rpc/README.md).

## Reviewed Files

- `README.md`
- `docs/vector-index.md`
- `ggml/include/ggml-vector-index.h`
- `ggml/CMakeLists.txt`
- `ggml/src/ggml-vector-index.cpp`
- `tools/rpc/README.md`
- `.github/workflows/build-rpc.yml`
- `ggml/include/ggml-rpc.h`
- `tools/rpc/rpc-server.cpp`
- `src/llama-lora-training.cpp`
- `ggml/src/ggml-xdna/README.md`
- `ggml/src/ggml-xdna/ggml-xdna.cpp`
- `tests/CMakeLists.txt`
- `CHANGELOG.md`
- `SECURITY.md`
- `CMakeLists.txt`
- `vendor/CMakeLists.txt`
