Repository navigation
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: (
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)ésCUDAGraphtámogatással,N = 1..8spekulatív unió-broadcasttal). -
Negatív VRAM-overhead
BitSplit-12ésFP8kernelek (Qwen2.5-3B, RTX 5090):-
BitSplit-12:-13.0%VRAM (5.37 GB),2.36×FFN gyorsulás (N=4spekulatív módban1.51×gyorsabb acuBLASTensor 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 GBRAM használat). - Ha a modell meghaladja a VRAM-ot (
Qwen2.5-32B-Instruct,65.53 GBBF16), a 12-SM Open-Page DDR5 UVA (38.83 GB/s,+30.2%) és a két-streamesCUDAGraphCore-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 el21.1 GBVRAM mellett, és4.32×–5.43×gyorsulást (3.41–4.29 tok/s) szigorú15.6 GBVRAM keretben!
- Ha a modell befér a videokártyára, 100%-ban a GPU VRAM-ban fut (
-
Perzisztens rétegenkénti súlyindex-gyorsítótár (
.ffmod_cache_v1/):1.81×kisebb tárhelyigény (36.28 GBvs.65.54 GBBF16), profilfüggetlen bitpontos visszatöltés bármilyen VRAM-korláttal (~10.8 mp64 rétegre PCIe NVMe SSD-ről). - OpenAI-kompatibilis HTTP + SSE Streaming Szerver (
ffmod-serve) ésvLLMplugin (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-DRouter: Scans<5%of dense traffic to identify winning channels and evaluates them across full hidden dimension$H$ (0graph breaks undertorch.compile(fullgraph=True)&CUDAGraph, plus union-active register broadcast for speculativeN = 1..8). -
Negative-Overhead
BitSplit-12(-13.0%VRAM) &FP8(-26.1%VRAM) Sparse Kernels: Up to2.55×–3.54×cold-cache FFN speedup and1.57×–1.70×end-to-end token throughput (91.6 -> 143.6..155.2 tok/sonQwen2.5-3B, beatingcuBLASTensor Cores by1.51×atN=4). -
VRAM-First Auto Placement (
--tiered-vram-gb auto) & 12-SM Open-Page DDR5 PCIe 5.0 Tiered Engine: Uses0 GBhost RAM whenever a model fits in VRAM, and seamlessly streams excess layers of32B–70B+models (Qwen2.5-32B-Instruct,65.53 GBBF16) over PCIe 5.0 inside a 2-stream fork-joinCUDAGraph(100%Top-1 match,4.74×–6.67×speedup in21.1 GBVRAM and4.32×–5.43×speedup in strict15.6 GBVRAM). -
Budget-Independent Persistent Sharded Cache (
.ffmod_cache_v1/):1.81×smaller on disk (36.28 GBvs65.54 GBBF16), hydrating any VRAM budget bit-identically at0.169 s/layer(~10.8 sfor 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