πŸ”§ Technical Docs

Everything you need to evaluate, install, and run BonfyreFPQ and the Bonfyre Stack. Benchmarks, hardware fits with pricing, reproduction commands, and full architecture reference.

FPQ Compression ↓ Hardware & Pricing ↓ Install ↓ Non-technical overview β†’
4Γ—Compression
0.997SLI Cosine
15HF Models
53Stack binaries
26Library Modules
~2.1 MBTotal Disk

Latest upgrades in this repo

A short technical changelog for what moved since the last public push.

Wire
Capture -> artifact -> recipe flow
BonfyreWire now includes deep probe, artifact materialization, recipe generation, and shared-space export on top of flow analysis and reporting.
CLI
Health-aware command surface
`bonfyre list --health`, repo/install drift checks, and subcommand sync helpers make the runtime surface more operationally inspectable after code updates.
Registry
Catalog / workflow / layer sync
Workflow, recipe, family, and layer registry surfaces are now a more important part of the public operator story, and the docs now record the repopulation commands.
Speech
Investigation stack docs
Architecture, integration, quickstart, adversarial competition, and discovery documents now sit beside the runtime instead of living as disconnected notes.
Operator Refresh Commands

When runtime code, registries, or CLI surfaces change, this is the command block that repopulates the operator-facing views and keeps `bonfyre-oss` honest after a pull.

make
./cmd/BonfyreCLI/bonfyre doctor sync-subcommands
./cmd/BonfyreIndex/bonfyre-index layers --root layeros/state
./cmd/BonfyreCLI/bonfyre list --health
./cmd/BonfyreWorkflow/bonfyre-workflow list
./cmd/BonfyreRecipe/bonfyre-recipe list
./cmd/BonfyreLayer/bonfyre-layer registry --root layeros/state
BonfyreFPQ β€” Functional Polar Quantization

Compress any model ~4Γ—. Run inference directly on compressed weights.

Pure C model compression engine. No GPU required. No Python dependencies. No training. The SLI bridge is live β€” native .fpq files run inference directly, no decompression step.

βœ“ Runtime gap closed β€” patch_model() and go. TinyLlama: 155 layers, cos=0.997, top-1=97.3%
0.9999 per-weight cosine
0.9976 output cosine (30 layers)
1,790 tensors compressed
54β†’27 GB Wan2.1-T2V-14B
15 models on Hugging Face

Three layers of correctness β€” all verified

Layer 1 β€” Weight Space
cos β‰ˆ 0.9999

Near-lossless per-tensor across all 307 encoded tensors in Wan2.1-T2V-1.3B. Worst tensor: 0.999590.

Layer 2 β€” Network Propagation
cos β‰ˆ 0.9976

Error stays controlled after 30 stacked transformer blocks. PSNR 35.97 dB. MSE 1.01e-3.

Layer 3 β€” System Behavior
stable Γ— all timesteps

Cosine holds 0.9976–0.9983 across the full diffusion schedule. No drift amplification.

Models compressed β€” real files, real numbers

Model Domain Original Compressed Tensors Avg Cos Worst Cos Avg bpw HF Model
Wan2.1-T2V-14B Video diffusion 54 GB 27 GB 402 0.999882 0.999826 4.05 Download β†’
Phi-4 (14B) Language model 28 GB 28 GB 162 1.000614 1.000149 4.08 Download β†’
Whisper Large V3 Speech recognition 8.7 GB 5.8 GB 998 0.999916 0.999834 4.19 Download β†’
Whisper Large V3 Turbo Speech recognition 1.6 GB 1.6 GB 228 0.999929 0.999858 4.18 Download β†’
Wan2.1-T2V-1.3B Video diffusion 5.3 GB 2.7 GB 307 0.999874 0.999590 β€” local
SmolLM2-135M Language model 101 MB 258 MB F16 211 0.999855 0.999589 β€” GGUF
Gemma 2B-it Language model β€” β€” sampled 0.99995 0.99995 β€” local
Whisper base.en Speech recognition β€” β€” sampled 0.999808 0.999763 β€” GGML

Artifacts on Hugging Face: (1) compatibility safetensors (direct Transformers load), and (2) native .fpq v12 files (rANS entropy-coded, 3.5–5.2Γ— smaller, direct inference via SLI bridge).

Output-Level Proof β€” Wan2.1-T2V-1.3B DiT Forward Pass

Loaded the original Wan2.1 model and FPQ-compressed version into the same WanTransformer3DModel architecture. Fed identical synthetic inputs (seed=42, shape [1,16,1,60,104], BF16 on MPS). Compared full forward pass outputs.

0.99759
Cosine Similarity
35.97 dB
PSNR
1.01e-3
MSE
6.18s β†’ 6.40s
Inference Time
Per-channel: ch0 cos=0.9960, ch1 cos=0.9993, ch2 cos=0.9952, ch3 cos=0.9980
Max absolute error: 0.138 (on a Β±0.45 std output range)
Relative error: 6.97% β€” well within the visually safe zone for video generation

Diffusion timestep sweep β€” Wan2.1-T2V-1.3B

Timestep Cosine PSNR (dB) MSE
t = 00.9983134.821.32e-3
t = 1000.9979235.491.13e-3
t = 5000.9975935.971.01e-3
t = 9000.9978236.021.00e-3
t = 9990.9980435.711.07e-3

Identical inputs at each timestep, BF16 on MPS. Cosine range: 0.99759–0.99831. Zero drift.

Perplexity benchmark β€” Qwen 2.5 0.5B, WikiText-2

994-token slice, max-length 512, stride 256. All runs on same hardware, same data.

Method PPL Ξ” baseline Avg Cos Worst Cos
Baseline (FP32)14.20β€”1.00001.0000
BonfyreFPQ @3-bit14.48+1.97%0.9997830.999588
HQQ @3-bit (g64)32.38+128%β€”β€”
COORD @3-bit (v4)35.59+150%0.9827610.982327

169 tensors. HQQ via standalone benchmark (group-size 64, axis 1, CPU). Proof pack.

Published 3-bit benchmarks β€” Llama-2-7B, WikiText-2

From authors' own papers. Lower PPL = better. FP16 baseline: 5.12.

Method Bits PPL Ξ” FP16 Source
FP16 (baseline)165.12β€”β€”
AQLM3.045.46+6.6%Egiazarian et al., ICML 2024
SpQR2.986.20+21.1%Dettmers et al., 2023
AWQ36.24+21.9%Lin et al., MLSys 2024
GPTQ3.008.06+57.4%Frantar et al., 2022
HQQ3Not published on Llama-2Badri & Shelor, 2023

Recent additions β€” runtime and system surfaces

The newer work is not just β€œmore helper modules.” It broadened both the shared runtime and the system-facing binaries around proxy, orchestration, communications, realtime relay, and delivery.

bf_opts β€” CLI parsing

Lightweight, getopt-style parser with subcommand support, typed options, and automatic `--help` generation for each binary.

bf_pool β€” Thread pool

Per-process worker pool with task queues, priorities, and cooperative shutdown hooks used by servers and background jobs.

bf_utf8 β€” SIMD UTF‑8 validator

High-speed UTF‑8 validator with SSE/NEON paths for safe, zero-copy text ingestion and pipeline sanitization.

bf_conf β€” Config parser

Simple INI/TOML-style parser with typed readers and layered includes for runtime configuration and hardware profiles.

bf_lz4 β€” Compression adapter

Thin LZ4 wrapper with streaming encode/decode helpers used by artifact transport and the local cache.

bf_hashmap β€” Robin‑Hood map

Cache-friendly hash table with robin‑hood probing and predictable iteration used in in-memory indexes and caches.

bf_csv β€” CSV reader/writer

Low-allocation CSV I/O with typed columns and dialect handling for bulk import/export tasks.

bf_json / bf_msgpack

Fast JSON helpers and a MessagePack event encoder/decoder for compact telemetry, ledgers, and manifest interchange.

bf_crypto

Portable BLAKE2b + ChaCha20‑Poly1305 wrappers for authenticated encryption, with password‑hash and signature helpers.

bf_bloom

Small Bloom filter utilities for single-pass dedup and membership checks in ingestion and pipeline stages.

bf_dns

Asynchronous DNS resolver with a tiny LRU cache and reactor integration for network-facing binaries.

bf_log

Structured, ring-buffer logging with per-thread buffers and file rotation for low-latency telemetry.

bf_mmap

Zero-copy mmap helpers with sensible madvise hints and safe fallbacks for pipes and small files.

bf_lmdb

LMDB-backed artifact cache with zero-copy reads and named sub-databases for manifests, blobs, and families.

bf_pipeline_coro / bf_textfuse

Coroutine-based pipeline primitives (libdill style) and an Hyperscan-powered single-pass text fusion engine for fast, composable pipeline stages.

bf_flatbuf

FlatBuffers builders/readers for compact artifact manifests and zero-copy transport between components.

bf_picohttpparser + mimalloc integration

SIMD-accelerated HTTP parsing in the reactor and optional per-reactor mimalloc arenas to reduce contention on high-concurrency servers.

bonfyre-proxy

OpenAI-compatible local API shim for transcriptions, chat-style summarization, and model listing. Useful when existing clients need to keep working while Bonfyre takes over the backend path.

bonfyre-orchestrate

Machine-only planner with policy memory, typed request state, and optional Gemma/OpenAI-compatible assist. Decides when extra Bonfyre blocks should be used instead of exposing a prompt UI.

bonfyre-tel / bonfyre-moq

Communications edge plus browser-native realtime relay. SIP voice/SMS/MMS on one side, MoQ/WebTransport on the other, both kept in the same C-first operating model.

bonfyre-swarm / bonfyre-narrate

Metered artifact distribution and verified audio output. One expands how artifacts move; the other expands how finished outputs are published and checked.

If you want short usage examples for any module (headers, init, simple API), tell me which ones and I'll add code snippets and minimal examples in this section.

What's inside

Low-Rank SVD
Global structure extraction
E8 Lattice
Optimal 8D quantization
16D RVQ
Structured residual correction
Ghost Head
Rank-1 error correction

GGUF format support (llama.cpp compatible)

Reads & dequantizes
F32, F16, Q4_0, Q5_0, Q8_0
Q4_K, Q5_K, Q6_K
Writes
GGUF v3 F16 β€” direct llama.cpp load
Preserves all metadata verbatim

Quick start

bonfyre-fpq quantize model.gguf compressed.gguf --bits 3
Input formats:
GGUF (llama.cpp, whisper.cpp)
Safetensors (HuggingFace)
GGML (legacy whisper)
Output formats:
GGUF F16 β†’ llama.cpp direct load
BF16 safetensors β†’ PyTorch/diffusers
Preserves all metadata + tokenizer
SLI Bridge β€” Direct Runtime Inference

Direct runtime inference from .fpq is now working. Load a compressed model and run it immediately β€” no conversion, no extra RAM, no hacks. The SLI bridge (Spectral Lattice Inference) is fully integrated.

Results (TinyLlama, 155 SLI layers):
β€’ 97.3% top-1 agreement vs original
β€’ 0.997 cosine similarity
β€’ 2/5 text matches (identical output)
(Full logs & proof pack)
Usage: patch_model(hf_model, fpq, resolver) β€” replaces nn.Linear layers with FPQLinear. No decode step, no weight copy.
FPQ-X β€” Generalized Compression Algebra Β· All 6 Operators Live

Six operators. One compiler. Rate–distortion–execution optimized.

FPQ-X evolves BonfyreFPQ from a quantizer into a full compression algebra. All six operator families are implemented and validated in fpqx_ops.c + fpq_bridge.py.

βœ“ A β€” Additive βœ“ M β€” Multiplicative Row Scale βœ“ Ξ  β€” Predictive βœ“ D β€” Distilled βœ“ Ξ› β€” Adaptive Policy βœ“ H β€” NEON Packing
𝒯(x,c,h,t) = (B + R + P) βŠ™ S + Ξ (x,c,h,t) + Ξ”_seq(c,t)
A = Additive core Β· M = Multiplicative manifold Β· Ξ  = Predictive restoration Β· D = Sequence distillation

Six operator families β€” each derived from 2026 published research

A
Additive
Inherited from FPQ v10

Low-rank SVD + E8 lattice + 16D RVQ + QJL projection + Ghost correction. The proven foundation delivering 0.999+ cosine across 1,790 tensors.

M
Multiplicative
Low-rank scaling manifold

Learns S = I + ABT via thin SVD of the ratio matrix Q = W/Ε΄ βˆ’ 1. Captures scaling distortion that additive methods miss. Auto-rollback if cosine doesn't improve.

Derived from: LoRDS, WaterSIC
Ξ 
Predictive
Context-conditioned restoration

Per-column linear predictor from the low-rank basis to the quantization residual. Uses already-available L factor to predict and cancel systematic error.

Derived from: EchoKV, MoBiQuant
D
Distilled
Sequence-axis compression

Attention-weighted K-means++ on KV cache vectors. Compresses along the sequence dimension β€” tokens that attend similarly share one cache atom. Orthogonal to weight quantization.

Derived from: KVSculpt, KV-CoRE
Ξ›
Adaptive
Per-tensor policy selection

Profiles each tensor: Ξ·L (low-rank energy), spectral gap, kurtosis, outlier fraction. Decision tree selects which operators to activate and at what rank.

Derived from: KV-CoRE, MoBiQuant
H
Hardware
Kernel-aligned packing

Inner-group quantization that aligns bit boundaries to SIMD lanes. Stores scales per group, enabling vectorized unpacking without scatter/gather overhead.

Derived from: InnerQ, High-Rate QMM

The FPQ-X encode pipeline

1. Ξ› Profile
β†’
2. BWA Prune
β†’
3. A Encode (v9)
β†’
4. M Scale
β†’
5. Ξ  Predict
Each stage has automatic quality rollback β€” if an operator doesn't improve cosine by >1e-7, it's disabled for that tensor.

FPQ v10 vs FPQ-X

Dimension FPQ v10 FPQ-X
Error modelAdditive only (W β‰ˆ Ε΄)Additive Γ— Multiplicative + Predictive
Per-tensor policySame pipeline for allΞ› profiles Ξ·L, gap, kurtosis β†’ selects operators
KV cacheWeight-only quantizationD operator: sequence-axis distillation
Hardware awarenessGeneric packingH operator: SIMD-lane-aligned groups
Objectivemin β€–W βˆ’ Ε΄β€–min Ξ»RΒ·Rate + Ξ»DΒ·Distortion + Ξ»EΒ·Execution
Research basisOriginal FPQ design9 papers from early 2026

bonfyre-fpqx CLI

# Full A+M+Ξ  pipeline
bonfyre-fpqx compress model.safetensors compressed.safetensors --bits 3

# Roundtrip quality test
bonfyre-fpqx roundtrip model.safetensors --bits 3

# Per-tensor compressibility analysis
bonfyre-fpqx profile model.safetensors

# KV cache distillation
bonfyre-fpqx distill cache.safetensors distilled.safetensors --atoms 256

# Hardware-aligned repacking
bonfyre-fpqx pack model.safetensors packed.safetensors --bits 3 --group-size 128

Research foundation β€” 9 papers synthesized

LoRDS
Multiplicative low-rank scaling
arXiv:2601.22716
WaterSIC
Activation-aware rate–distortion
arXiv:2603.04956
EchoKV
Predictive KV reconstruction
arXiv:2603.22910
KVSculpt
Attention-weighted cache distillation
arXiv:2603.27819
KV-CoRE
Data-dependent compressibility
arXiv:2602.05929
InnerQ
Hardware-aligned inner quantization
arXiv:2602.23200
MoBiQuant
Token-adaptive mixed precision
arXiv:2602.20191
High-Rate QMM
Activation-weighted matrix multiply
arXiv:2601.17187
Codebook Opt.
Optimal codebook initialization
arXiv:2602.06557

KV Cache Compression β€” 9 Optimizations

Baseline cosine numbers (bonfyre-kvcache C benchmark). All 9 Python optimizations live in fpq_bridge.py.

Bits KV Cosine Hardware implication
5-bit 0.99996 ~5.3Γ— more context β€” 8K ctx β†’ 42K in same VRAM
4-bit 0.99994 4Γ— more context β€” recommended for production
3-bit 0.99990 5.3Γ— context, some quality loss on long sequences
#3 Attention-Weighted Tiles

High-attention blocks dominate tile assignment. Codebook quality concentrates where the model actually looks.

#4 Per-Layer Adaptive Bits

Ξ›-profiler analyzes each K/V layer β€” kurtosis, spectral gap, outlier fraction β€” to pick the right bit depth automatically.

#5 Cross-Layer Shared Codebook

One 256-tile codebook learned across 8 sample layers. Skip per-call K-means β€” compress all layers in amortized O(1).

#6 D-Operator Distillation

K-means++ on KV vectors to K atoms (K β‰ͺ N). Tokens that attend similarly share one atom. Bug-free nearest-centroid lookup.

#7 Delta Encoding

Only the delta vs previous frame is compressed. Each new token costs far less than storing a new frame.

#8 Huffman PMF Weighting

E8 coordinate magnitude as Huffman code length proxy. High-cost blocks get upweighted β€” rate-quality jointly optimized.

#9 LT_SMALL_INT Fast Path

Near-zero blocks (max abs ≀ 63) bypass E8 lattice β€” 7-bit integer round + clamp. Significant throughput win on embedding layers.

#10 M-Operator Row Scale

Per-row scale vector on each FPQLinear. Applied after SLI matmul: corrects per-output-channel amplitude drift.

#11 H-Operator NEON Packing

ARM NEON 128-bit aligned pre-packing. Eliminates scatter/gather β€” vectorized unpacking on Apple Silicon and Jetson.

Use individually or compose: patch_kv_cache(adaptive_bits=True, shared_tiles=tiles) activates #4 + #5 simultaneously.

Hardware Fits & Pricing

What hardware runs what β€” and what it costs.

FPQ weight compression + KV cache optimizations change the hardware equation. What used to need cloud GPUs now fits on-device. Use cases shift depending on your hardware budget.

Device RAM Approx. Cost (2026) Before (BF16) After (FPQ 4-bit + KV)
Raspberry Pi 5 8 GB $80 TinyLlama only, 512-token ctx, no video TinyLlama + 2K ctx, Whisper turbo inference, local ASR pipeline
Jetson Orin Nano 8 GB $250 Qwen 0.5B only, degraded at >512 ctx Qwen 0.5B @ 4K ctx Β· NEON packing Β· embeddings + FPQ inference co-resident
Apple M1 MacBook (16 GB) 16 GB unified $900 refurb Qwen 0.5B (tight), Wan 1.3B (no headroom) Wan 1.3B + 4K ctx KV Β· HCP speech + SLI co-resident Β· NEON-packed
Apple M2/M3 Max (64 GB) 64 GB unified $2,500–3,500 Phi-4 14B (no KV headroom past 2K) Wan 14B @ 8K ctx Β· Phi-4 @ 32K ctx with delta KV Β· full pipeline concurrent
T4 cloud (16 GB VRAM) 16 GB VRAM ~$0.35/hr spot Qwen 3B, 2K ctx max before OOM Qwen 3B @ 8K ctx Β· Wan 1.3B + full diffusion sweep Β· shared KV codebook
RTX 4090 (24 GB VRAM) 24 GB VRAM $1,600 GPU / ~$0.50/hr cloud Wan 1.3B (tight), Phi-4 14B doesn't fit Wan 1.3B @ 32K ctx Β· Phi-4 14B fits Β· adaptive bits saves ~30% KV RAM
RTX 6000 Ada (48 GB VRAM) 48 GB VRAM ~$1.10/hr (RunPod) Wan 14B (tight), long video sequences OOM Wan 14B Β· 287 SLI layers @ 5-timestep sweep Β· multi-second video KV cached

Budget tiers β€” what opens up at each price point

Under $100
Raspberry Pi 5

Local ASR with Whisper turbo. TinyLlama inference. Bonfyre pipeline binaries. Edge transcription kiosk.

$250 – $1,000
Jetson Orin / M1 Mac

Qwen 0.5B + 4K ctx. Wan 1.3B video. HCP speech + SLI co-resident. NEON packing. Full local pipeline.

$2,500 – $3,500
M2/M3 Max

Wan 14B @ 8K ctx. Phi-4 @ 32K ctx with delta KV. Full Bonfyre pipeline + inference concurrent. Production-grade local stack.

Cloud spot ($0.35–$1.10/hr)
T4 / RTX 4090 / RTX 6000

Burst GPU for video generation, large model inference, SLI sweeps. Use FPQ to fit bigger models on cheaper instances. T4 now handles what used to need A100.

Weight footprint
~2.2 GB β†’ 1.1 GB

TinyLlama 1.1B β€” stays in .fpq at runtime, no decode step. BF16 copy never materializes.

KV context scaling
8K β†’ 32K tokens

4-bit KV compression in same VRAM budget. Delta encoding makes each new token incremental.

ARM throughput
NEON 128-bit

H-operator pre-packing on Apple Silicon and Jetson β€” vectorized unpacking, no scatter/gather.

Co-residency
Inference + pipeline

FPQ model + HCP speech + vector search + pipeline can run concurrently on a 16 GB Mac.

FPQ Compression Benchmarks

Every number from a real run. Raw logs, scripts, and CSVs in the repo. ↑ FPQ overview

0.999882Avg cosine β€” Wan2.1-T2V-14B (402 tensors)
0.999916Avg cosine β€” Whisper Large V3 (998 tensors)
1,790Tensors compressed across 15 models
+1.97%PPL degradation β€” Qwen 0.5B @3-bit
54β†’27 GBWan2.1-T2V-14B (50% compression)
28 GBPhi-4 14B β€” near-lossless (cos 1.000614)
8.7β†’5.8 GBWhisper Large V3 (33% compression)
0.999826Worst-case tensor cosine (Wan2.1-T2V-14B)
4.05–4.19Bits per weight range @3-bit
0.99759DiT output cosine (30 transformer blocks)
+128%HQQ @3-bit PPL (65Γ— worse than FPQ)

Artifact links

Hugging Face Model Hub

BF16 safetensors (drop-in) + native .fpq v12 files (rANS, direct SLI inference).

Wan2.1-T2V-14B (54β†’27 GB) β†’ Phi-4 14B (28 GB) β†’ Whisper Large V3 (8.7β†’5.8 GB) β†’ Whisper Large V3 Turbo (1.6 GB) β†’
Proof Pack (2026-04-10)

Qwen PPL (v8 vs v4 vs HQQ), Whisper roundtrip, CSV, PNG chart, reproduction commands.

View proof pack β†’
BENCHMARKS.md

Full benchmark report: version progression, weight tables, KV cache, speed optimization, binary sizes.

View benchmarks doc β†’
BonfyreFPQ Source

Pure C11: main.c, fpq_codec.c, ggml_reader.c, fpq.h. Builds with make on macOS/Linux.

View source β†’

System Benchmarks

Apple M-series, after 6 optimization passes (P0–P6). All real. FPQ benchmarks ↑

5–8 msPer-stage latency (was 76 ms)
9.3%Lambda Tensors compression (N=10K)
237 msONNX embed (was 600 ms Python)
6 msfastText inference (was 150 ms Python)
536 bytesArtifact struct (was 1,076)
5 msSIMD exact vector search
15.5Γ—Batch embed speedup (10 files)
~10Γ—Hash hex (LUT vs snprintf)

Optimization passes

P0 β€” Foundation
Pure C rewrite
Python β†’ C11, ONNX multi-thread, VECF binary format, -O3 -march=native -flto
P1 β€” Tokenizer
Trie + inline DB
Hash table β†’ trie tokenizer, --insert-db zero-file-I/O embed path
P2 β€” SIMD
Batch + cosine
NEON SIMD cosine, batch embed, libbonfyre shared runtime
P3 β€” Native
fastText in C
Pure C fastText, libbonfyre β†’ 29 binaries, DB connection pooling
P4 β€” Architecture
Hardening pass
FNV hash registry, SHA-256 dedup, PGO targets, TCP_NODELAY, SIGPIPE
P5 β€” Datatype
10 syntax wins
Hex LUT ~10Γ—, struct 1076β†’536, O(nΒ²)β†’O(n), raw syscalls, switch dispatch
P6 β€” Realtime
C media relay
Native WebTransport/MoQ relay in C. Optional experimental tuning and clustering hooks exist, but the core value is a small self-hosted realtime primitive.
P7 β€” Runtime
26-module shared lib
libbonfyre expanded into the reactor, hotload, coroutine, zero-copy, SIMD parse, and transport layer underneath the wider stack. Eliminates hand-rolled duplicates across the binaries that sit above it.
MetricBefore (P0)After P5Improvement
Single embed~600 ms237 ms2.5Γ—
10-file batch embed~6,000 ms386 ms15.5Γ—
Pipeline (6 stages)76 ms8 ms9.5Γ—
Tag inference~150 ms6 ms25Γ—
Hash hex~100 ns~10 ns~10Γ—
Artifact struct1,076 bytes536 bytes2Γ— cache density
Vector file (384-dim)6.4 KB JSON1,544 bytes VECF4.2Γ— smaller
BonfyreTel β€” Realtime Relay

Pure C realtime media relay. Same Bonfyre philosophy.

bonfyre-moq is the C-first realtime transport layer for BonfyreTel. Built on ngtcp2 + nghttp3 + OpenSSL 3 + SQLite, it gives Bonfyre a browser-native relay primitive that matches the rest of the stack: small binary, local control, SQLite observability, and no dependency on a hosted realtime vendor.

βœ“ MoQ-Transport draft-14 βœ“ Pure C11 βœ“ SQLite stream log βœ“ WebTransport session termination βœ“ Subscriber fan-out βœ“ Zero-Copy Object Forwarding

Core pieces first, optional experiments second

Transport Core
bonfyre-moq.c

Handles QUIC, HTTP/3, WebTransport session setup, MoQ control parsing, subscriber fan-out, and SQLite stream/session logging in one C binary.

ngtcp2 + nghttp3 + OpenSSL 3 + SQLite
Observability
transport_sessions + stream_events

Uses the same Bonfyre style as the rest of the stack: log the useful state to SQLite, keep the binary understandable, and make downstream processing compose cleanly with other tools.

session.open Β· broadcast.announce Β· track.forward.stop
C-First Direction
bonfyre-moq is the product path

The goal is not β€œa Node relay with a C rewrite later.” The goal is all C. The Node moq-edge subtree is useful as a spec/reference harness, but the main narrative and target runtime stay native.

make bonfyre-moq
Experimental Hooks
inference.c / optimizer.c / mesh.c / consensus.c

These modules exist, but they should be read as optional experiments around the relay, not the core promise. The core promise is simpler: private realtime media transport in a small native binary.

keep the core path understandable first

Relay internals

QUIC / WebTransport (ngtcp2+nghttp3)
 β†³ MoQ control parsing β†’ publish / subscribe / namespace tracking
 β†³ zero-copy forward β†’ subscriber fan-out
 β†³ SQLite stream log β†’ session + event visibility for the rest of Bonfyre
kqueue/epoll event loop Β· graceful drain Β· optional experimental extension hooks

Build & run

# Build the native relay
make bonfyre-moq

# Run relay
./bonfyre-moq --host 127.0.0.1 --port 4443 \
               --runtime-dir /tmp/bonfyre-moq \
               --db /tmp/bonfyre-moq/relay.db

# Optional extension-module check
make test-bonfyre
C11No Node.js
MoQBrowser-native transport
SQLiteRealtime event log
SmallFits Bonfyre narrative
C-firstMain product path

Architecture

A small stack of focused binaries and libraries. Not a monolith. Not a framework. Each piece stays legible enough to run on its own.

Unix philosophy

Each binary does one thing. Compose with pipes, files, or the pipeline binary. bonfyre-media-prep audio.wav | bonfyre-transcribe | bonfyre-brief

Process isolation

Every binary runs as its own process. No shared memory. If one crashes, nothing else does. Separate processes clean up on exit.

Dynamic linking

Whisper via libwhisper (Homebrew). LLM via llama-completion subprocess. SQLite via system library.

Pipeline DAG

Audio in β†’ ingest β†’ media-prep β†’ transcribe β†’ transcript-clean β†’ paragraph β†’ brief β†’ proof β†’ pack β†’ distribute
                                    ↳ embed β†’ vec (semantic search)
                                    ↳ tag + tone (enrichment)
                                    ↳ render β†’ emit (HTML/PDF/EPUB/RSS)
                                    ↳ moq (WebTransport relay Β· SQLite stream log Β· C-first realtime primitive)

Five layers

Surfacecms Β· api Β· auth Β· pipeline Β· cli Β· transcript-family Β· project Β· tel Β· proxy Β· orchestrate
Valueoffer Β· gate Β· meter Β· ledger Β· finance Β· outreach Β· pay Β· pack Β· distribute
Transformmedia-prep Β· transcribe Β· transcript-clean Β· paragraph Β· brief Β· proof Β· embed Β· narrate Β· render Β· emit Β· mfa-dict Β· weaviate-index Β· repurpose Β· segment Β· clips Β· speechloop Β· tone Β· tag Β· canon Β· query
Substrateingest Β· hash Β· index Β· compress Β· stitch Β· graph Β· runtime Β· queue Β· sync
Librarieslibbonfyre (26 modules: event loop, thread pool, crypto, JSON/FlatBuf/MsgPack, LZ4, UTF-8, hashmap, CSV, config, CLI, logging, DNS, mmap, bloom, coroutines, erasure coding, hot-reload) Β· liblambda-tensors (Huffman, arithmetic coding)

Stack Binaries And Libraries

The stack now spans 51 focused binaries shown here, plus shared libraries. Every piece is standalone enough to use alone. ~2.1 MB total disk.

Substrate (9 binaries) β€” cold, stable infrastructure. Never imports product concepts. Content-addressed output.

bonfyre-ingest 35 KB — universal intake: type detection, BOM stripping, CRLF→LF, inline SHA-256 (no double-read), manifest stamping. PURE|CACHEABLE|IDEMPOTENT.
bonfyre-hash 34 KB β€” FIPS 180-4 SHA-256 content addressing. Streaming hash over arbitrary-size inputs. Dedup via Bloom filter (8 KB, k=7, 0.01% FPR).
bonfyre-index 68 KB β€” SQLite artifact index with FTS5 virtual table for full-text search. Family-key grouping for structural queries.
bonfyre-compress 34 KB β€” family-aware zstd with dictionary training from sample corpus. Per-family ratio reporting. Level tuning (1-19). Dict library management.
bonfyre-stitch 34 KB β€” DAG materializer: execution plan generation, dead-branch pruning, cache hit statistics.
bonfyre-graph 51 KB β€” Merkle-DAG artifact graph with breadth-first materialization. SHA-256 interior nodes.
bonfyre-runtime 34 KB β€” process lifecycle manager: dispatches queue/pipeline/ledger subprocesses.
bonfyre-queue 34 KB β€” SQLite WAL job queue: concurrent writers, per-worker thread pool (default 4), FTS5 result search, webhook dispatch, exponential backoff retry.
bonfyre-sync 34 KB β€” cross-instance artifact replication with sync manifests.

Transform (22 binaries) β€” pure, cacheable, stateless. Same input β†’ same output. Cache key = (operator, params, input_hash).

bonfyre-media-prep 34 KB β€” 16 kHz mono WAV normalization, noise gate, denoising via ffmpeg resampling.
bonfyre-transcribe 34 KB β€” Whisper + HCP v3.2: quad-channel spectral (acoustic + morpho + bigram + trigram), KIEL-CC Kalman, E-T Gate, formant anchoring, 9-layer hallucination detection, morphological logit bias. 0.999 quality (base).
bonfyre-transcript-clean 34 KB β€” Hyperscan single-pass >1 GB/s pattern fusion (6 classes: filler/halluc/keyword/quality/tag/chunk-hdr) or Aho-Corasick fallback 200 MB/s.
bonfyre-paragraph 35 KB β€” sentence boundary detection with structural paragraph formatting.
bonfyre-brief 34 KB β€” executive summary + action items via TF-IDF keyword extraction + BM25 ranking (Robertson '94, document-length normalization).
bonfyre-proof 34 KB β€” quality scoring: length, filler ratio, hallucination probability, BM25 confidence metrics. Machine-verifiable proof bundle.
bonfyre-embed 52 KB β€” ONNX all-MiniLM-L6-v2 (384-dim), trie tokenizer, batch mode (6.5Γ— faster), --insert-db zero-file-I/O path.
bonfyre-vec 35 KB β€” sqlite-vec similarity search with NEON SIMD cosine. 5 ms exact search over 3K artifacts.
bonfyre-narrate 68 KB β€” Piper neural TTS with 6-layer fidelity verification.
bonfyre-render 34 KB β€” Handlebars/Jinja2 template rendering from artifact manifests.
bonfyre-emit 34 KB β€” multi-format output via pandoc: HTML, PDF, EPUB, RSS.
bonfyre-mfa-dict 34 KB β€” CMU dict + custom rules for MFA pronunciation dictionary generation.
bonfyre-weaviate-index 34 KB β€” Weaviate vector database integration for semantic search.
bonfyre-transcript-family 34 KB β€” composed chain: ingest β†’ transcribe β†’ clean β†’ paragraph in one call.
bonfyre-repurpose 34 KB β€” brief β†’ social formats: tweets, LinkedIn, carousel, YouTube description, newsletter. Template-based.
bonfyre-segment 50 KB β€” idea boundary detection via temporal clustering + energy peaks. Outputs segment graph + rhythm profile.
bonfyre-clips 35 KB β€” auto clip discovery: silence detection + energy thresholding β†’ candidate timestamps.
bonfyre-speechloop 34 KB β€” Whisper β†’ transform β†’ Piper feedback loop for iterative speech refinement.
bonfyre-tone 34 KB β€” OpenSMILE eGeMAPSv02: 88 acoustic features (MFCCs, pitch, jitter, shimmer, voiced energy). Tone profile + diff.
bonfyre-tag 35 KB β€” native C fastText inference: topic + intent tagging + language detection. 2 ms, no GPU.
bonfyre-quant 42 KB β€” v8 RLF weight quantization: E8 lattice snap + ΞΌ-law warp + 16D RVQ. 0.9999+ per-weight cosine.
bonfyre-kvcache 42 KB β€” KV cache compression: 9 optimization passes, attention-weighted tiles, per-layer adaptive bits.

Surface (11 binaries) β€” product-facing, stateful services. Own mutable state. HTTP/CLI interfaces.

bonfyre-cms 287 KB β€” dynamic schemas + versioning. Every record is Lambda Tensors-compressed. REST API. 921 ΞΌs/create. Replaces Strapi (1,742Γ— smaller).
bonfyre-api 69 KB β€” async HTTP gateway: per-core kqueue/io_uring reactors, SSE real-time streams, token-bucket rate limiting (120 req/min), CORS, SPA fallback.
bonfyre-auth 35 KB β€” user signup/login with SHA-256 passwords, session tokens, expiry management.
bonfyre-pipeline 52 KB β€” unified in-process pipeline via libdill coroutines (~50 ns context-switch). Gate β†’ Ingest β†’ Hash β†’ Index β†’ Compress β†’ Meter β†’ Stitch β†’ Ledger. 5-8 ms/stage, >93% faster than forking.
bonfyre 34 KB β€” unified CLI dispatcher: pipes to any binary via subcommand.
bonfyre-project 34 KB β€” project scaffolding with template-based directory generation.
bonfyre-tel 68 KB β€” communications edge runtime: FreeSWITCH ESL voice/SMS/MMS today, with persistent topics, identities, intents, and transport-agnostic event state underneath.
bonfyre-moq ~120 KB β€” pure C WebTransport/MoQ relay: ngtcp2 + nghttp3 + OpenSSL 3, SQLite stream log, subscriber fan-out, zero-copy object forwarding.
bonfyre-canon 35 KB β€” structural canonicalization via Tree-sitter AST parsing. Produces structural hash + structural diff.
bonfyre-proxy 53 KB β€” OpenAI-compatible API: set OPENAI_API_BASE=localhost:8787. Existing code works unchanged. Drop-in replacement.
bonfyre-orchestrate 45 KB β€” machine-only planner with typed request state, policy memory, feedback scoring, and optional Gemma/OpenAI-compatible assist.

Value (9 binaries) β€” monetization, metering, delivery. Separate privilege boundary.

bonfyre-offer 34 KB β€” quality-based dynamic pricing: proof-score β†’ tier options β†’ proposal generation.
bonfyre-gate 34 KB β€” API key tiers (Free/Pro/Enterprise): entitlement checking, key file validation (JSON + expiry + allowed_ops whitelist).
bonfyre-meter 34 KB β€” per-operation usage tracking: operation counters, billing aggregation.
bonfyre-ledger 34 KB β€” append-only financial records: immutable log, audit trail.
bonfyre-finance 51 KB β€” service arbitrage + bundle pricing: offer + meter β†’ revenue model.
bonfyre-outreach 51 KB β€” outreach event tracking + follow-up routing.
bonfyre-pay 35 KB β€” invoicing, payments, credits: entry point for Stripe/Cash integration.
bonfyre-pack 34 KB β€” deliverable packaging: ZIP + JSON manifest for complete artifact families.
bonfyre-distribute 34 KB β€” async delivery to email, Slack, webhooks. Fire-and-forget with receipt tracking.

Libraries

libbonfyre ~180 KB β€” shared runtime with 26 modules across 10 domains (see below)
liblambda-tensors 72 KB β€” structural JSON compression

libbonfyre β€” 26 modules, 10 domains

Every binary links libbonfyre.a (~180 KB). Zero external dependencies beyond libc + SQLite. All modules are C11, portable across macOS/Linux/BSD, with SIMD fast paths on ARM NEON and x86 SSE4.2 where applicable.

Core (4)
bf_artifact β€” content-addressed manifest: FNV-1a-64 family/canonical keys, binary cache (.bfrec/.bfsum), parse/serialize
bf_operators β€” 51-operator registry with O(1) lookup, behavioral flags (PURE|STATEFUL|CACHEABLE|REVERSIBLE|IDEMPOTENT), exactness classes
bf_sha256 β€” FIPS 180-4 streaming SHA-256
bf_common β€” dir creation, file I/O, timestamps, FNV-1a, JSON field extraction
Networking (3)
bf_reactor β€” per-core async I/O (kqueue on macOS, io_uring on Linux 5.1+). Zero-copy recv via registered buffers, SSE persistent read, token-bucket rate limiting
bf_dns β€” async DNS resolver
bf_picohttpparser β€” zero-copy HTTP/1.1 request parser
Crypto (2)
bf_crypto β€” BLAKE2b hash/HMAC/KDF, XSalsa20-Poly1305 AEAD secretbox, Ed25519 signing. Portable impl + libhydrogen/libsodium delegation
bf_bloom β€” split-block Bloom filter: 8 KB fixed, k=7 hashes, FNV-1a seeded, ~10K items @ 0.01% FPR
Serialization (3)
bf_json β€” SIMD JSON engine (yyjson-inspired): 16-byte aligned scanning, SSE4.2/NEON acceleration, lazy number parsing, zero-copy strings
bf_flatbuf β€” FlatBuffers zero-copy serialization: read directly from wire buffer without unpacking
bf_msgpack β€” MessagePack binary serialization
Concurrency (2)
bf_pool β€” Chase-Lev work-stealing thread pool: lock-free per-worker deques (C11 atomics), idle workers steal from random peers, auto core detection
bf_pipeline_coro β€” structured concurrency via libdill: lightweight coroutines, typed channels, deadline API. ~50 ns context-switch vs ~5 ΞΌs fork
Data & I/O (4)
bf_lmdb β€” zero-copy LMDB cache: 512 MB default, 4 named DBs (artifacts/families/blobs/meta), pointer casts into mmap (no deserialization)
bf_mmap β€” portable mmap: MAP_PRIVATE + MADV_SEQUENTIAL hints, pipe/stdin fallback for non-seekable inputs
bf_csv β€” RFC 4180 streaming parser: zero-copy field access, quoted field handling, configurable delimiter, writer with auto-quoting
bf_conf β€” INI/TOML config: layered search (/etc/bonfyre/ β†’ ~/.config/bonfyre/ β†’ ./), env override (BONFYRE_SECTION_KEY), $VAR expansion
Text & Unicode (2)
bf_utf8 β€” SIMD UTF-8: SSE4.2 PCMPISTRI / NEON validation, Hoehrmann DFA, codepoint iteration, case folding (ASCII + Latin-1/Extended-A + Greek + Cyrillic), U+FFFD sanitization
bf_textfuse β€” Hyperscan/Aho-Corasick pattern fusion: 6 pattern classes (filler/halluc/keyword/quality/tag/chunk-hdr), single-pass >1 GB/s or fallback 200 MB/s
Compression (2)
bf_lz4 β€” self-contained LZ4 block compression: single-shot + streaming API, hash-table greedy match finder, 64-byte 8-wide match length. No external tool spawn
bf_fountain β€” Luby Transform fountain codes: O(N) rateless encoder/decoder, 5% overhead, robust soliton distribution, any K-of-N reconstruction
Containers (1)
bf_hashmap β€” Robin-hood open-addressing: power-of-2 capacity, ~0.75 load factor, backshift deletion (no tombstones), FNV-1a default hash, configurable callbacks, string convenience API
CLI & Ops (3)
bf_opts β€” declarative CLI parser: typed args (BOOL/STRING/INT/DOUBLE/PATH), subcommands, auto --help, combined short opts, ~ expansion
bf_log β€” structured logging with level filtering, color terminal output, file rotation
bf_hotload β€” live pipeline reload: dlopen plugins, file-watcher (kqueue/inotify), A/B test support, per-stage metadata/flags

liblambda-tensors β€” 5-tier structural compression

Family-based JSON compression: artifacts sharing structure (same schema, same field names) compress dramatically better together. Every tier preserves O(1) random field access β€” no full decompression needed.

V1 β€” Varint + zigzag + type tags
88% of raw Β· 12 type codes Β· Headers only overhead
V2 β€” Small-int/float32/empty-str + LZ77
64.9% of raw Β· Position stride table
Interned β€” Cross-member string dedup
29% of raw Β· Family string pool index
Huffman β€” Per-position canonical codes
13.5% of raw Β· Cost-pruned codebooks
Arithmetic β€” Range coding
~11% of raw Β· Shannon entropy measurement

Operator Model

Every pipeline stage is a typed operator with declared behavior β€” the scheduler uses these flags to parallelize, cache, and reorder safely.

51 Operators Across 4 Layers

Substrate (9 ops) β€” ingest, normalize, segment, chunk
Transform (22 ops) β€” transcribe, summarize, score, semantics
Surface (10 ops) β€” format, render, template, deliver
Value (10 ops) β€” price, invoice, pay, distribute, prove

Behavioral Flags

PURE β€” deterministic, no side effects β†’ safe to cache & parallelize
STATEFUL β€” mutates external state (DB, filesystem)
CACHEABLE β€” output cached by SHA-256(input) in LMDB
REVERSIBLE β€” undo supported (audit, rollback)
IDEMPOTENT β€” safe to retry without duplication

Exactness Classes

BF_EXACT_BYTE β€” bit-identical output every run (hash, compress)
BF_EXACT_CANON β€” canonical but with format flexibility (JSON field reorder)
BF_EXACT_LOSSY β€” model-dependent (transcription, summarization)

Content-Addressed Artifacts

Every operator input/output is a BfArtifact. SHA-256 content hash for identity. family_key (FNV-1a-64 of type+system) groups related artifacts. canonical_key distinguishes format variants. Binary cache files: .bfrec records + .bfsum summaries.

Cross-cutting Architecture

Capabilities that span every binary, not just one stage.

Content-Addressed Dedup

Every artifact gets a SHA-256 identity. If the hash already exists in the local LMDB cache, the stage is skipped entirely. Re-running a pipeline on the same input costs near zero β€” only changed stages execute.

Zero-Copy LMDB Cache

512 MB memory-mapped store with 4 named databases (artifacts, families, blobs, meta). Reads are pointer casts into mmap β€” no malloc, no deserialization. Cache lookups take ~200 ns vs ~5 ms disk I/O.

Family-Aware Storage

Artifacts with the same schema (type+system) share a family_key. Lambda-tensors compress families 7Γ— better than individual compression because field names, types, and structure are shared across the family.

Fountain Codes for Lossy Links

Luby Transform rateless encoding: sender emits coded packets forever, receiver reconstructs from any K-of-N. 5% overhead. Perfect for satellite, mobile, or lossy last-mile delivery where TCP retransmits are expensive.

Operator Hot-Loading

bf_hotload watches operator .so plugins via kqueue/inotify. When a new version appears, the pipeline swaps it in without restart. Supports A/B testing across operator versions with per-stage metadata.

Work-Stealing Parallelism

Chase-Lev lock-free deques with C11 atomics: each core gets a private work queue, idle cores steal from random peers. Combined with libdill coroutines (~50 ns context switch), pipelines fully saturate all cores with minimal coordination.

SIMD Throughout

SSE4.2 and ARM NEON fast paths in JSON parsing (16-byte aligned scan), UTF-8 validation (PCMPISTRI), text pattern fusion (Hyperscan >1 GB/s), and vector cosine similarity. Automatic runtime dispatch β€” falls back cleanly on older hardware.

Crypto Primitives

BLAKE2b (hash/HMAC/KDF), XSalsa20-Poly1305 (AEAD encryption), Ed25519 (signing). No OpenSSL dependency. Portable C implementation with optional libsodium delegation if available.

How-To: Pick Your Entry Point

Each is standalone β€” you don't need to understand the whole system.

Direct .fpq Inference (SLI Bridge)

Run models directly from .fpq files. patch_model() replaces nn.Linear with FPQLinear. TinyLlama: 155 layers, cos=0.997, top-1=97.3%. bonfyre-oss.

patch_model(hf_model, fpq, resolver)
5 min to try

KV Cache Compression

4Γ— more context tokens in same VRAM. 9 optimization passes. Works with nn.Linear and FPQLinear simultaneously.

patch_kv_cache(model, bits=4, adaptive_bits=True)
2 min to try

Model Quantization (v8 RLF)

Quantize LLM weights to 3-bit with 0.9999+ cosine. E8 lattice snap + ΞΌ-law warp + 16D RVQ. 42 KB binary.

bonfyre-quant benchmark model.gguf --bits 3
5 min to try

Lightweight CMS

Replace Strapi's 500 MB with a 287 KB binary. Dynamic schemas, token auth, REST API. bonfyre-cms.

bonfyre-cms serve --port 8800
2 min to try

Local Transcription + HCP

Local speech for public or private audio. Live proof. bonfyre-intake.

bonfyre-transcribe run audio.wav
5 min to try

Audio-to-Invoice Pipeline

Audio β†’ transcript β†’ summary β†’ quality score β†’ pricing β†’ deliverable. 5–8 ms per stage. bonfyre-pipeline.

bonfyre-pipeline run --input audio.mp3
2 min to try

Semantic Vector Search

Embed docs + NEON SIMD cosine search. Replace $250/mo Pinecone. bonfyre-embed.

bonfyre-embed --insert-db my.db
5 min to try

Realtime Relay

Pure C WebTransport/MoQ relay for private live audio and browser-native media flows. Keeps the same Bonfyre style: small binary, local control, SQLite observability, no hosted relay vendor in the middle.

./bonfyre-moq --port 4443 --db relay.db
make bonfyre-moq to build

OpenAI-Compatible API

Drop-in replacement. Set OPENAI_API_BASE=http://localhost:8787. 53 KB binary.

bonfyre-proxy serve --port 8787
1 min to try

Reproduce Everything

Every number on this site comes from scripts in the repo.

# Weight roundtrip β€” Wan2.1 (307 tensors)
./bonfyre-fpq roundtrip-v9 ~/.local/share/models/wan2.1-t2v-1.3b/diffusion_pytorch_model.safetensors --bits 3

# Compress GGUF (llama.cpp compatible)
./bonfyre-fpq quantize model.gguf compressed.gguf --bits 3

# Compress safetensors
./bonfyre-fpq quantize model.safetensors compressed.safetensors --bits 3

# Perplexity benchmark
python3 perplexity_benchmark.py --model Qwen/Qwen2.5-0.5B --bits 3 --mode v8

# DiT forward-pass comparison
python3 scripts/wan_dit_compare.py

# SLI bridge inference test
python3 test_sli_plus_kvcache.py --device mps

# Full Bonfyre pipeline
git clone https://github.com/Nickgonzales76017/bonfyre-oss.git && cd bonfyre-oss && make
time ./bin/bonfyre-pipeline run --input audio.wav

# Run tests
make test # 167/167 tests

All scripts, logs, and CSVs: 10-Code/BonfyreFPQ/ Β· Proof pack: results/2026-04-10-proof-pack/

Install

Build from source in under 60 seconds. All 83 modules, pure C11, no runtime dependencies.

Platform support

Platform Status Path
macOS arm64 (Apple Silicon) βœ“ native make && make install or ./install.sh
macOS x86_64 (Intel) βœ“ native make && make install or ./install.sh
Linux x86_64 βœ“ build from source make && make install or docker build .
Linux arm64 βœ“ build from source make && make install
Windows WSL2 use WSL2 + Ubuntu path above

⚠ If you downloaded a zip: bundled binaries are Mach-O arm64 (macOS Apple Silicon only) and will not run on Linux. Linux users must build from source or use Docker.

macOS β€” build from source

# Clone and build (macOS β€” recommended)
git clone https://github.com/Nickgonzales76017/bonfyre-oss.git
cd bonfyre-oss
make # builds all 83 modules from source
make install # copies binaries to ~/.local/bin
# One-liner (macOS)
curl -fsSL https://raw.githubusercontent.com/Nickgonzales76017/bonfyre-oss/main/install.sh | sh

Linux β€” build from source

# Ubuntu / Debian β€” install deps then build
sudo apt-get install -y gcc make libsqlite3-dev zlib1g-dev pkg-config
git clone https://github.com/Nickgonzales76017/bonfyre-oss.git
cd bonfyre-oss
make CC=gcc # builds all modules
make install # copies to ~/.local/bin
# One-liner (Linux)
curl -fsSL https://raw.githubusercontent.com/Nickgonzales76017/bonfyre-oss/main/install.sh | sh

Docker β€” any platform

# Build + run the full Bonfyre stack in Docker (Linux x86_64 binaries)
git clone https://github.com/Nickgonzales76017/bonfyre-oss.git
cd bonfyre-oss
docker compose up -d # API on :9999, queue worker, SQLite WAL
# Extract Linux binaries from Docker image (macOS β†’ Linux cross-build)
make docker-build # outputs Linux x86_64 binaries to out/linux-x86_64/

Build requirements: C11 compiler (gcc β‰₯ 9 or clang β‰₯ 11), make, SQLite3 dev headers, zlib. Optional: ONNX Runtime (bonfyre embed), FreeSWITCH (bonfyre tel), PyTorch SLI bridge.

MIT Licensed. Ship with it.

Full source. Real benchmarks. Reproduction scripts included.