# Repository Briefing: Alexintosh/Frankengine
> Source: https://repoforai.com/repo/Alexintosh/Frankengine (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Alexintosh/Frankengine
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: C++
- **License**: Apache-2.0
- **Engineering Health**: A (78/100 · Maintenance 35/35 · Adoption 12/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, Local AI, GPU, API, CLI
- **Momentum**: 19 ★ total (+0 24h / +18 7d) · 4 forks
- **Topics**: `infe`, `inference-engine`, `inference-optimization`, `inkling-2-mini`
- **When to Use**: Best for: Teams with supported Blackwell hardware that have chosen Inkling-2-Mini and need local long-context or batched serving through an OpenAI-compatible endpoint. Skip if: You need multiple model families, non-Blackwell deployment, full OpenAI API feature parity, or a managed service without GPU operations.

## Overview
```text
### Architecture & Core Mechanics
Frankengine is a native C++/CUDA runtime specialized for Inkling-2-Mini, a 30B-A3.6B Looped MoE. `ingine-serve` exposes an OpenAI-compatible HTTP API with SSE streaming. The engine handles prompt prefill in chunks and can use the separate DFlash2 drafter to propose tokens for target-model verification. BatchDFlash2 combines batched speculation with AngelSpec D-cut and single-pass exact rejection sampling without a logits buffer. Exact rejection sampling is a decoding property, not a guarantee that an FP8 preset is bit-exact.

The native build in `engine/native` targets specific Blackwell architectures. B200/B300 have a `tcgen05` UMMA path for operations including FP8 GEMM and batched MoE. Single-GPU builds can omit the communication layer; distributed builds add the vendored `tp_comm` transport. Dual DGX Spark uses TP=2 over RoCEv2, while the B200/B300 path supports tensor-parallel configurations up to TP=8 over NVLS/P2P.

### Key Capabilities & Differentiators
Frankengine offers FP8 presets and a bit-exact PICO12 + CERT_HEAD path. Context capacity, vision, and batching depend on the launcher profile: selected DGX Spark and B200/B300 configurations reach 1,048,576 tokens for a solo request, while RTX 5090 presets default to vision off. On one RTX PRO 6000, the ALL 73 single-stream benchmark records 410.4 tok/s in FP8 and 385.1 tok/s in exact mode; both pass the 30/30 quality guard.

The RTX PRO 6000 batch benchmark reports 3,602 tok/s aggregate at 64 streams and 5,812 tok/s at 128 streams, both at 1,024-token context. These are short-context batch figures, not single-user rates or throughput at maximum context. For interactive or long-context serving, evaluate prefill and per-stream decode separately rather than sizing from the batch roofline.

### Trade-offs & Limitations
Choose Frankengine for a fixed model and supported hardware, not as a general-purpose inference backend. Its specialization lets you tune precision, KV cache layout, and tensor parallelism around Inkling-2-Mini. Compared with the hosted OpenAI API, it keeps inference on infrastructure you operate but makes GPU provisioning, networking, and capacity planning your responsibility. OpenAI-compatible transport reduces client changes; it does not establish feature parity.

On RTX PRO 6000, the fast preset uses 54.6 GiB versus 76.2 GiB for exact mode. The FP8 preset passes the benchmark quality guard, but that is not evidence of numerical equivalence for other prompts. Choose the precision and context preset against your own quality requirements, then test VRAM headroom and per-stream performance under the expected concurrency.

### Hardware & Deployment Guide
Build on Linux (`x86_64` or `aarch64`) with a supported Blackwell GPU, NVIDIA driver 580+, CUDA Toolkit 13.0+, CMake 3.28+, and GCC 12+. The download workflow uses Python 3.10+ and the Hugging Face `hf` CLI for the base model and pinned DFlash2 drafter, totaling 21.2 GB. Build `ingine-serve` for service and `ingine-bench`, `ingine-batch-bench`, and `ingine-validate` for local qualification.

The hardware launchers bind to `http://127.0.0.1:8834/v1` by default. Use `DRY_RUN=1` to inspect resolved options and `scripts/test_launchers.sh` to check profiles offline. For dual Spark, configure the worker, rendezvous IP, and model paths for both nodes in `scripts/local.sh`. There are no published releases; for reproducible deployments, pin the engine commit alongside the model revisions and rerun qualification before upgrading.
```

## Key Capabilities
```text
- Runtime: native C++/CUDA inference for the 30B-A3.6B Inkling-2-Mini Looped MoE on NVIDIA Blackwell.
- Decoding: BatchDFlash2 with GAMMA=7 and AngelSpec D-cut, plus single-pass exact rejection sampling without a logits buffer.
- Precision: FP8 throughput presets and a bit-exact PICO12 + CERT_HEAD path; the RTX PRO 6000 fast and exact presets budget 54.6 and 76.2 GiB, respectively.
- Parallelism: vendored `tp_comm` for two-node DGX Spark over RoCEv2 and B200/B300 tensor parallelism over NVLS/P2P.
- Serving: OpenAI-compatible HTTP/SSE, native vision on supported profiles, and up to 1,048,576 tokens of solo context on selected configurations.
- Operations: hardware-specific launchers, `DRY_RUN=1` to inspect resolved commands, and `ingine-validate` for validation.
```

## Quick Start / Clone
```bash
git clone https://github.com/Alexintosh/Frankengine.git && cd Frankengine
hf download thinkingmachines/Inkling-2-Mini --local-dir models/Inkling-2-Mini
hf download incoai/Inkling-2-Mini-DFlash2 \
  --revision 4f9088ea66c21f2b99ed657d1941c306b03e84d2 \
  --local-dir models/Inkling-2-Mini-DFlash2
```
