Third-party notices¶
Fucina is licensed under the MIT License (see LICENSE), with one documented
exception noted below. This file inventories every third-party component in
the tree, grouped by how the material got here:
- Vendored — third-party source code or data copied into this repository.
- Ported — Zig translations or reimplementations of third-party code; the Zig files are Fucina's, the design and in some cases the operation-for-operation structure are upstream's.
- Parity reference — no code copied; Fucina's original implementation is validated to match the upstream's behavior/output.
Provenance below was verified against the vendored file headers, upstream LICENSE files, and repository pages (last checked 2026-07-07).
Vendored code and data¶
| Component | Files | Upstream | License |
|---|---|---|---|
ggml Metal quantized-GEMM kernel (kernel_mul_mm, dequantize_q4_K/q6_K/q8_0, block structs) |
src/backend/metal/ggml_mul_mm.metal |
ggml-org/llama.cpp (ggml/src/ggml-metal/ggml-metal.metal, ggml-common.h) |
MIT, Copyright (c) 2023-2026 The ggml authors |
| CUDA quantized-GEMM/GEMV kernels — dequant bit-logic + block structs translated from the vendored Metal kernel above (compute core is Fucina-authored FFMA tiling) | src/backend/cuda/kernels.cu (+ generated kernels.ptx) |
same ggml lineage as ggml_mul_mm.metal |
MIT, Copyright (c) 2023-2026 The ggml authors |
| Apple MLX "steel" GEMM Metal kernel (f32/f16) | src/backend/metal/mlx_gemm.metal |
ml-explore/mlx (backend/metal/kernels/steel/gemm) |
MIT, Copyright © 2023-2024 Apple Inc. |
| ggml IQ/TQ/FP4 dequantization lookup tables (numeric codebooks) | src/backend/quant_tables.zig |
ggml-org/llama.cpp (ggml/src/ggml-common.h) |
MIT, Copyright (c) 2023-2026 The ggml authors |
| miniaudio v0.11.25 (single-header audio I/O) | examples/nam/third_party/miniaudio.h |
mackron/miniaudio | Dual: public domain (Unlicense) or MIT No Attribution, at your option — Copyright 2026 David Reid; full texts in the vendored header |
llguidance v1.7.6 — parser + toktrie crates (constrained-decoding engine: grammar compiler, Earley parser, token-mask computation; Rust, compiled and linked only under -Dllguidance=true) |
vendor/llguidance/ (crate sources byte-verbatim; the two Cargo.toml manifest deviations and the pinned upstream commit are documented in vendor/llguidance/README.md; crates.io dependencies are fetched at build time, pinned by the committed Cargo.lock, not redistributed here) |
guidance-ai/llguidance | MIT, Copyright (c) Microsoft Corporation |
| font8x8 glyph table (128 ASCII 8×8 bitmaps, Marcel Sondaar's IBM-style ROM font) | examples/locate_anything/visualize.zig |
dhepper/font8x8, via locate-anything.cpp | Public domain |
Ported code¶
From ggml / llama.cpp (ggml-org/llama.cpp, MIT, Copyright (c) 2023-2026 The ggml authors):
- Block-quantization encoders and formats (
src/backend/quant/,src/backend/quant.zig): the f32→quantized row encoders (Q4_K/Q5_K/Q6_K/Q8_0/TQ2_0 + legacy formats) are operation-for-operation ports ofggml-quants.c'squantize_row_*_reffunctions, kept byte-exact against ggml's output; the block struct layouts mirrorggml-common.h. The hot matmul/GEMV kernels operating on these formats are Fucina-original, with one borrowed technique credited in-source (the AVX2 int8 sign-transfer dot trick); the TQ2_0 ternary kernels (quant/ternary.zig) re-expressggml_vec_dot_tq2_0_q8_K's unpack/bsums structure (ggml-cpu/arch/{arm,x86}/quants.c) through Fucina's SIMD primitives, blocking, and dispatch. - Qwen2/GPT-2 pretokenizer (
src/llm/tokenizer.zig): faithful port ofunicode_regex_split_custom_qwen2(src/unicode.cpp), plus the qwen35 mark-aware variant of the same rules; token-ID-exact vsllama-tokenize. - SentencePiece tokenizer (
src/llm/spm_tokenizer.zig): faithful port ofllm_tokenizer_spm(src/llama-vocab.cpp); byte-exact vsllama-tokenize. - Unicode classification tables (
src/llm/unicode_categories.zig, generated bytools/gen_unicode_categories.py): generated to match llama.cpp'sunicode-data.cpp, itself derived from the Unicode Character Database. - SIMD
expf(src/backend/vector/primitives.zig): implements theggml_v_expfscheme, itself adapted from ARM optimized-routines (MIT, Copyright Arm Limited) — constant-for-constant in Zig vector form. - Model graphs (
src/llm/gemma/gemma4.zig,src/llm/qwen35/model.zig): implemented with llama.cpp'ssrc/models/*.cppas source of truth, validated by logit parity. DiffusionGemma (src/llm/diffusion_gemma/model.zig) was implemented from llama.cpp draft PR #24423 (at the time unmerged) plus the Hugging Face reference implementation. Inkling (src/llm/inkling/, an architecture by Thinking Machines Lab — thinkingmachines/Inkling) was implemented from Daniel Han's (Unsloth) llama.cpp draft PR #25731 (at the time unmerged) as the source of truth for the GGUF layout, graph, tokenizer pretokenizer, and multimodal projector; his unsloth/inkling-GGUF conversions are the parity oracle. The\p{M}addition to the Unicode classification tables (src/llm/unicode_categories.zig) is still generated from llama.cpp'sunicode-data.cpp. - GGUF format (
src/gguf.zig): the format was created by the ggml/llama.cpp project; Fucina's reader/writer is an independent Zig implementation kept byte-compatible with ggml's writer.
From other projects:
| Component | Files | Upstream | License |
|---|---|---|---|
| Parakeet ASR engine (port) | src/llm/parakeet/ |
mudler/parakeet.cpp by Ettore Di Giacinto | MIT |
| LocateAnything detection engine (port: preprocessing, MoonViT/Qwen2 graph structure, MTP box-decode heuristics, prompt/box token schema, GGUF schema) | examples/locate_anything/ |
mudler/locate-anything.cpp by Ettore Di Giacinto and Richard Palethorpe; the underlying LocateAnything-3B model is NVIDIA's (weights not in this repo, subject to their model license) | MIT |
| face-detect.cpp face pipeline (port: SCRFD/ArcFace/GenderAge/MiniFASNet/landmark graph structure and BN-fold conventions, cv2-exact letterbox + umeyama align constants, anchor decode + NMS semantics, GGUF schema incl. the embedded anti-spoof/landmark node lists, CLI JSON formats) | examples/facedetect/ |
mudler/face-detect.cpp by Ettore Di Giacinto; the underlying buffalo_l / landmark models are insightface's (weights not in this repo, subject to insightface's non-commercial model license; GGUF conversions from mudler/face-detect-gguf) | MIT |
Pillow BICUBIC resampler (port, via locate-anything.cpp's pil_resize.cpp) |
examples/locate_anything/preproc.zig |
python-pillow/Pillow libImaging/Resample.c |
MIT-CMU |
| OmniVoice TTS engine (port, incl. Higgs Audio v2 codec chain, torchaudio-parity resampler, pydub-parity postproc, Philox RNG alignment) | examples/omnivoice/ |
ServeurpersoCom/omnivoice.cpp | MIT |
| Neural Amp Modeler runtime (port) | examples/nam/ |
sdatkinson/NeuralAmpModelerCore | MIT |
| NAM trainer recipe + loudness asset | examples/nam/, examples/nam/resources/ |
sdatkinson/neural-amp-modeler | MIT |
| Byte-level BPE tokenizer core | src/llm/tokenizer.zig |
ZINC — Zig INferenCe engine | MIT, Copyright (c) 2025 ZINC Contributors |
erff (used by gelu_erf) |
src/backend/ops.zig |
musl libc src/math/erff.c |
MIT (FDLIBM lineage, Copyright (C) 1993 Sun Microsystems, Inc.) |
| Muon optimizer | src/optim.zig |
KellerJordan/Muon; RMS-matching scale per Moonlight (arXiv:2502.16982) | MIT |
| splitmix64 PRNG | src/rng.zig |
Sebastiano Vigna's reference implementation | CC0 / public domain |
tools/ref-patches/ holds small instrumentation patches applied to the
reference clones for parity-dump regeneration only; their diff context
quotes the upstream they modify (currently parakeet.cpp and
face-detect.cpp, both MIT, Ettore Di Giacinto). It also holds
la_dump.cpp, an out-of-tree dump harness that compiles against the
unmodified locate-anything.cpp build (MIT) — it links the reference, it
does not vendor it.
APOLLO — license exception¶
src/optim.zig's APOLLO optimizer is a from-scratch Zig implementation of
the published algorithm (arXiv:2412.05270); algorithms are not subject to
copyright and no upstream code was copied there.
tools/gen_optim_goldens.py, however, contains an apollo_steps() golden
generator transcribed from the apollo_torch reference implementation,
whose repository is licensed CC-BY-NC-4.0 (with GaLore-derived portions
under Apache-2.0). That file is therefore not covered by this
repository's MIT grant: the APOLLO-derived portion remains subject to the
upstream CC-BY-NC-4.0 terms (attribution: the APOLLO authors,
https://github.com/zhuhanqing/APOLLO). The golden numeric values embedded in
src/optim_tests.zig are program outputs, not code, and carry no such
restriction.
Ported code — ds4¶
From ds4 (antirez/ds4, MIT, Copyright (c) 2026 The ds4.c authors — Salvatore Sanfilippo):
- DeepSeek V4 Flash reference numerics (
src/llm/deepseek4/model.zig): the e4m3fn/e2m1 quantization grids (including tie-breaks), the FP8 KV row quantizer, the Hadamard-128 transform, the 4x4 Sinkhorn combine normalization, and the rope-tail/YaRN blend are operation-for-operation ports of the corresponding ds4.c functions; the surrounding forward pass re-expresses the same architecture through Fucina's tensor ops. - joyai-llm pre-tokenizer (
src/llm/tokenizer.zig): faithful port of ds4.c's splitter; prompt-token-count-exact vs the official API fixtures. - ds4 is also the validation oracle:
zig build deepseek4 -- --vectors/ --goldenreplay its shipped test fixtures from the pinned checkout (refs/ds4/, fetched bytools/fetch_refs.sh; nothing vendored).
Ported code — PrismML llama.cpp fork¶
From Prism ML's llama.cpp fork
(PrismML-Eng/llama.cpp, prism
branch — a fork of ggml-org/llama.cpp; MIT, Copyright (c) 2023-2026 The
ggml authors, with the Q2_0 additions authored by Prism ML):
- Q2_0 (Bonsai g128) ternary format (
src/backend/quant/cold.zig,src/backend/quant/ternary.zig, block struct insrc/dtype.zig): the block layout (128 elements, f16 absmax scale + sequential LSB-first 2-bit codes), the f32→Q2_0 row encoder (quantize_row_q2_0_refsemantics, value-exact), and the decode/dot semantics ((q-1)·d, codes {0..3}) are ported from the fork'sggml-quants.c/ggml-cpusources — at the pinned commit the format is fork-only (ggml type 42). The hot kernels around the format (micro-tiling, bsum/scale caches, lane accumulation, the BLAS panel arm) are Fucina-original. - The fork is also the parity oracle for the Ternary-Bonsai-27B port:
logits via
tools/llama_logits.cppcompiled against its CPU build, token IDs via itsllama-tokenize(pinned intools/fetch_refs.sh, nothing vendored). Bonsai-demo (PrismML-Eng/Bonsai-demo, Apache-2.0) is pinned for the whitepapers and run recipes only. The Ternary-Bonsai model weights (Apache-2.0, Hugging Face) are not in this repository.
Ported code — speech stack¶
From LocalVQE (localai-org/LocalVQE, Apache-2.0):
- GTCRN-AEC acoustic echo canceller (
examples/voiceagent/aec.zig): a 1:1 Zig port of the scalar referenceggml/gtcrn/gtcrn.cpp— ERB sub-band analysis, SFE, the grouped-conv encoder, the grouped dual-path RNN, the grouped-deconv decoder, and the complex-ratio mask, operation for operation, including the streaming state discipline. Gated per stage against the.npyfixtures LocalVQE ships (see Test fixtures below). The model architecture is upstream GTCRN (Xiaobin-Rong/gtcrn, ICASSP 2024), which LocalVQE credits.
From kyutai Pocket TTS (kyutai-labs/pocket-tts, MIT):
- Pocket TTS v2 (
src/llm/pockettts/,examples/pockettts/): a pure-Zig port of the streaming text-to-speech model — the prefix-LM backbone, the 1-step flow-matching (LSD) latent head, and the VAE-style Mimi decoder. Per-stage numerical parity is pinned against dumps produced by running the stock pinned checkout (tools/pocket/pocket_dump.py). babybirdprd/pocket-tts (MIT), a Candle implementation, was consulted as a second opinion where the reference leaves a tensor layout implicit.
From qwentts.cpp (andimarafioti/qwentts.cpp, MIT, Copyright (c) 2023-2026 The omnivoice.cpp authors) and its bindings (andimarafioti/qwentts-cpp-python, MIT, Copyright (c) 2026 Andres Marafioti):
- Qwen3-TTS (
src/llm/qwen3tts/,examples/qwen3tts/): the talker, the MTP code predictor, and the 12.5 Hz RVQ codec decoder follow the graph decomposition of the C++ reference (RVQ dequant → pre-transformer → upsample → DAC decoder). Token-level and per-stage parity is pinned against activations dumped from the pinned checkout through its python bindings. andimarafioti/faster-qwen3-tts (MIT) is a design reference only, consulted for the streaming decode decomposition; no code copied and no parity asserted against it.
Parity references (no code copied)¶
Fucina implementations validated against, but not derived from: NVIDIA NeMo FastConformer/Parakeet (Apache-2.0 framework; CC-BY-4.0 checkpoints), parakeet-mlx (Apache-2.0, consulted decode reference), k2-fsa / Xiaomi OmniVoice (Apache-2.0 code; CC-BY-NC pretrained weights), Boson AI Higgs Audio v2 (Apache-2.0), Meta HuBERT / fairseq (MIT), Descript Audio Codec (MIT), torchaudio (BSD-2-Clause), pydub (MIT), PyTorch (BSD-3-style; optimizer/loss golden fixtures are torch program outputs, no PyTorch code distributed), Hugging Face safetensors (Apache-2.0; independent implementation of the format), NVIDIA cuRAND / PyTorch Philox (output-matched only).
colibri (JustVugg/colibri,
Apache-2.0) is a design reference for the out-of-core MoE expert streaming
(src/exec/expert_store.zig): the pinned-set + LRU disk tier, persistent
usage histogram, and router-lookahead prefetch follow its design; no code
was copied and no output parity exists (Fucina streams ggml quants over its
own fused kernels; colibri uses its own int4 container).
ik_llama.cpp (ikawrakow/ik_llama.cpp,
MIT) is a design reference for the CUDA quantized-prefill split-K path
(src/backend/cuda/kernels.cu): the underfilled-grid K partition with an
on-stream fixed-order reduction adapts the Stream-K occupancy principle of
its MMQ implementation (audited principally in ggml/src/ggml-cuda/mmq.cuh
at the pinned commit in tools/fetch_refs.sh); no code was copied — Fucina's
WMMA tiles, tile-table ABI, and reduction kernel are its own, and the
grouped-MoE path does not use the split.
Test fixtures¶
examples/nam/testdata/*.nam— four tiny format-parity fixtures from the NeuralAmpModelerCore ecosystem (MIT; provenance inexamples/nam/testdata/README.md).examples/nam/resources/loudness_input.wav— the standardized loudness measurement signal required by the.nammetadata contract (MIT; seeexamples/nam/resources/README.md).- Quantization golden vectors in tests — byte outputs of running ggml's encoders over documented inputs (generated 2026-06-11).
goldens-aec/*.npy— the per-stage GTCRN-AEC fixtures published by LocalVQE (Apache-2.0) underggml/tests/gtcrn/, copied in unmodified; provenance and refresh recipe ingoldens-aec/README.md.goldens-qwen3tts/**— reference activations produced by running the pinned qwentts.cpp checkout through its python bindings (MIT); the dumps are program output, not upstream source. Recipe ingoldens-qwen3tts/README.md.refs/pocket-tts-dumps/(not committed) — Pocket TTS reference activations, regenerated locally bytools/pocket/pocket_dump.pyagainst the stock pinned checkout.
Linked system libraries (not redistributed)¶
The build can link a CBLAS provider for GEMM: Apple Accelerate (Apple SLA),
OpenBLAS (BSD-3-Clause), Intel MKL (Intel Simplified Software License), BLIS
(BSD-3-Clause), or NVPL (NVIDIA SLA). None of their code is included in this
repository; -Dblas=none builds with no external BLAS at all.
Model weights (not included)¶
The repository contains no model weights. Weights you download to run the
examples carry their own licenses: Qwen3/Qwen3.5 (Apache-2.0), Gemma 4 /
DiffusionGemma (Google's Gemma Terms of Use), NVIDIA Parakeet (CC-BY-4.0),
OmniVoice (CC-BY-NC pretrained weights), Higgs Audio v2 codec (upstream
terms), Qwen3-TTS (Alibaba's upstream terms; the GGUF conversions used by
examples/qwen3tts are third-party redistributions), Pocket TTS (kyutai, CC-BY-4.0, which permits
redistribution and format conversion with attribution; kyutai additionally
publishes a use policy prohibiting voice cloning without consent and
deceptive use, and gates the model behind accepting it). Its voices are
licensed INDIVIDUALLY and not uniformly — huggingface.co/kyutai/tts-voices
lists each, and some (the expresso and ears sets) are CC BY-NC 4.0.
The English pack this port converts ships only two, both permissive:
alba (alba-mackenna/casual.wav, CC BY 4.0 — attribution required) and
marius (voice-donations/Selfie.wav, CC0). Anyone extending the
conversion to the other voices should re-check, since pulling in an NC voice
would attach a non-commercial restriction to the resulting GGUF, and the
GTCRN-AEC canceller weights used by examples/voiceagent (LocalVQE,
Apache-2.0; trained on the Microsoft DNS Challenge corpus, CC-BY-4.0, and
fine-tuned on the AEC Challenge). See RUNNING-MODELS.md for the per-model
notes.
LocalVQE additionally documents a safety caveat that carries over to any deployment of those weights: its training data was filtered with DNSMOS, which can misclassify distressed speech (screaming, crying) as noise, so the canceller may attenuate it.
MIT license text (for the components above marked MIT)¶
The MIT-licensed components listed above are used under the standard MIT
License; the copyright holder for each is named in its entry, and vendored
files carry their original headers. The full MIT text is reproduced in this
repository's LICENSE file.