Skip to content

Releases

FFMod v0.2.0 — Self-Indexed Sparse SwiGLU & PCIe 5.0 Tiered LLM Engine

Choose a tag to compare

@ferencfresz ferencfresz released this 16 Nov 09:45

FFMod v0.2.0 — Self-Indexed Sparse SwiGLU/GeGLU & PCIe 5.0 Tiered LLM Engine

Szerző / Author: Frész Ferenc / Ferenc Frész (ferenc.fresz@gmail.com)
Zenodo DOI: DOI (https://doi.org/10.5281/zenodo.24277071)


🇭🇺 Magyar Összefoglaló

Az FFMod v0.2.0 egy tanítás- és kalibrációmentes (zero-training, zero-data), kétlépcsős (Coarse-to-Fine) Triton GPU motor SwiGLU és GeGLU alapú nagy nyelvi modellekhez (Qwen2 / Qwen2.5 / Qwen3, Llama-2 / Llama-3, Mistral, Gemma / Gemma-2, Phi-3, DeepSeek, Yi).

Főbb újdonságok és eredmények

  • Kétágú Smooth-INT4 × Top-D önindexelő router: <5% memóriaforgalomból megbecsüli a valódi csatornahatást, majd teljes $H$ dimenzióban egzaktul értékeli ki a nyertes $K$ csatornát (torch.compile(fullgraph=True) és CUDAGraph támogatással, N = 1..8 spekulatív unió-broadcasttal).
  • Negatív VRAM-overhead BitSplit-12 és FP8 kernelek (Qwen2.5-3B, RTX 5090):
    • BitSplit-12: -13.0% VRAM (5.37 GB), 2.36× FFN gyorsulás (N=4 spekulatív módban 1.51× gyorsabb a cuBLAS Tensor Core-oknál!), 143.6 tok/s (1.57×).
    • FP8: -26.1% VRAM (4.56 GB), 2.55×–3.54× FFN gyorsulás, 143.9–155.2 tok/s (1.57×–1.70×).
  • Egységes VRAM-első automatikus memóriakezelés (--tiered-vram-gb auto) és PCIe 5.0 Pre-Attention Prefetch (32B–70B+ modellekhez):
    • Ha a modell befér a videokártyára, 100%-ban a GPU VRAM-ban fut (0.00 GB RAM használat).
    • Ha a modell meghaladja a VRAM-ot (Qwen2.5-32B-Instruct, 65.53 GB BF16), a 12-SM Open-Page DDR5 UVA (38.83 GB/s, +30.2%) és a két-streames CUDAGraph Core-Prefetch + Exact Delta Fixup (92.6% mag-precizitás, 100% Top-1 egyezés) 4.74×–6.67× gyorsulást (3.84–5.40 tok/s) ér el 21.1 GB VRAM mellett, és 4.32×–5.43× gyorsulást (3.41–4.29 tok/s) szigorú 15.6 GB VRAM keretben!
  • Perzisztens rétegenkénti súlyindex-gyorsítótár (.ffmod_cache_v1/): 1.81× kisebb tárhelyigény (36.28 GB vs. 65.54 GB BF16), profilfüggetlen bitpontos visszatöltés bármilyen VRAM-korláttal (~10.8 mp 64 rétegre PCIe NVMe SSD-ről).
  • OpenAI-kompatibilis HTTP + SSE Streaming Szerver (ffmod-serve) és vLLM plugin (apply_ffmod_to_vllm).

📘 Dokumentációk (HU / EN): README_hu.md · USER_GUIDE_hu.md / USER_GUIDE_en.md · SYSTEM_GUIDE_hu.md / SYSTEM_GUIDE_en.md · EXPERIMENTAL_REPORT_hu.md / EXPERIMENTAL_REPORT_en.md


🇬🇧 English Summary

FFMod v0.2.0 is a zero-training, zero-calibration Coarse-to-Fine Triton GPU runtime for SwiGLU and GeGLU Large Language Models, separating static parameter storage from dynamic input-dependent compute planning.

Highlights

  • Self-Indexed Dual-Branch Smooth-INT4 × Top-D Router: Scans <5% of dense traffic to identify winning channels and evaluates them across full hidden dimension $H$ (0 graph breaks under torch.compile(fullgraph=True) & CUDAGraph, plus union-active register broadcast for speculative N = 1..8).
  • Negative-Overhead BitSplit-12 (-13.0% VRAM) & FP8 (-26.1% VRAM) Sparse Kernels: Up to 2.55×–3.54× cold-cache FFN speedup and 1.57×–1.70× end-to-end token throughput (91.6 -> 143.6..155.2 tok/s on Qwen2.5-3B, beating cuBLAS Tensor Cores by 1.51× at N=4).
  • VRAM-First Auto Placement (--tiered-vram-gb auto) & 12-SM Open-Page DDR5 PCIe 5.0 Tiered Engine: Uses 0 GB host RAM whenever a model fits in VRAM, and seamlessly streams excess layers of 32B–70B+ models (Qwen2.5-32B-Instruct, 65.53 GB BF16) over PCIe 5.0 inside a 2-stream fork-join CUDAGraph (100% Top-1 match, 4.74×–6.67× speedup in 21.1 GB VRAM and 4.32×–5.43× speedup in strict 15.6 GB VRAM).
  • Budget-Independent Persistent Sharded Cache (.ffmod_cache_v1/): 1.81× smaller on disk (36.28 GB vs 65.54 GB BF16), hydrating any VRAM budget bit-identically at 0.169 s/layer (~10.8 s for 64 layers on PCIe NVMe).
  • Attached Assets: Wheel (ffmod-0.2.0-py3-none-any.whl), Source Tarball (ffmod-0.2.0.tar.gz), English Paper (ffmod_paper_en.pdf), and Hungarian Paper (ffmod_paper_hu.pdf).

Quick Install & Run

pip install ffmod-0.2.0-py3-none-any.whl
ffmod-serve --model Qwen/Qwen2.5-3B --payload fp8 --port 8000
# Or automatic VRAM/DDR5 placement on any local checkpoint (3B to 70B+):
ffmod-serve --model /path/to/model --tiered-vram-gb auto --port 8000