Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Betelgeuse Alpha-Orionis

Betelgeuse

  • Run Inkling 2 Mini on a single 12 GB GPU.
  • 50 tok/s generation. Over 1,200 tok/s prompt processing. Original checkpoint weights. Just 16 GB of system RAM.

Betelgeuse: a deep-red block star with an amber core

Native inference for memory-constrained hardware.
A C++/CUDA fork of llama.cpp, developed and optimised on consumer GPUs.

Release Model Target Status Engine


Quick start

One command installs the CLI and prebuilt runtime into your user directory. No root access and no compiler are needed on the validated platform.

curl -fsSL https://github.com/Betelgeuse-AI/Betelgeuse/releases/latest/download/install.sh -o install.sh && sh install.sh

Then download the model and oracle, and start an interactive terminal chat:

betelgeuse pull inkling-2-mini
betelgeuse run inkling-2-mini

To serve the OpenAI-compatible API and web interface instead:

betelgeuse serve inkling-2-mini

The API is at http://127.0.0.1:8080/v1/chat/completions and the web interface at http://127.0.0.1:8080/:

curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"inkling-2-mini","messages":[{"role":"user","content":"Write a Python LRU cache"}]}'

Supported out of the box: Linux x86-64 with an NVIDIA SM86 GPU (RTX 3060 12 GB validated), CUDA driver 580+, 16 GB system RAM and an AVX2/AVX-VNNI CPU. The published archive is SM86 only; other GPUs and operating systems use sh install.sh --source or the source-build guide. Run betelgeuse doctor to check a machine, and see Troubleshooting if a command fails.

Already have the original checkpoint? Point the CLI at it without downloading a second copy:

betelgeuse run inkling-2-mini --path /path/to/Inkling-2-Mini

Advanced flags such as --context, --threads, --no-oracle and --set KEY=VALUE are documented in docs/betelgeuse.md.

Release

v0.8.0 · Final release

Betelgeuse ships a native CUDA inference engine for Thinking Machines Lab's Inkling 2 Mini. It executes the original mixed NVFP4, MXFP8 and BF16 checkpoint directly, without GGUF conversion or additional weight quantisation. All originally routed experts are evaluated. The reported benchmarks use neither expert skipping nor speculative decoding.

v0.8.0 consolidates the validated ordinary decoding path with the CPU routing oracle. The oracle prefetches nonresident experts from two small INT8 predictors and is opt-in with INK2_ORACLE=1. It does not change routing, weights, sampling or output tokens. Predictor weights are published separately at Betelgeuse-AI/Inkling-2-Mini-Routing-Oracle and are replaceable at runtime without recompilation.

The engine is designed around limited VRAM and host memory rather than assuming the entire checkpoint can remain on the GPU. It combines architecture-aware expert residency, bounded GPU fetching and separate prefill and decode memory profiles within a single process.

Developed on an RTX 3060 12 GB, Intel Core i5-12400 and 16 GB of single-channel DDR4.

[!IMPORTANT] Compatibility break: previous model integrations are deprecated. v0.7.0 introduces substantial changes to the inference runtime, memory management and execution paths. DeepSeek-V4.1-Flash (1017) and Alpha-Orionis-XS (Qwen3.8 Flash Next) are no longer supported targets for this release. Their existing bundles, launch flags and paging configurations may fail or behave differently with the new build. Use the earlier revision known to work with your model. Backward compatibility is not guaranteed; deprecation does not imply that every legacy code path has been removed.

[!WARNING] Research preview. This is an independent fork, not an upstream llama.cpp release. Native Inkling execution has been validated on Linux x86-64 with NVIDIA Ampere SM86. Other configurations require independent validation.

Contents

Model support

ModelCheckpoint formatv0.8.0 status
Inkling 2 MiniOriginal NVFP4 / MXFP8 / BF16 safetensorsValidated native engine
DeepSeek-V4.1-Flash (1017)Legacy GGUF / Engram / DSparkDeprecated; not revalidated
Alpha-Orionis-XS (Qwen3.8 Flash Next)Legacy four-file GSQ-RCO IQ2_XS bundleDeprecated; not revalidated
Other llama.cpp modelsGGUFCompatibility not established by this release

The unified executables are bel-server (HTTP server) and bel-cli (CLI). The standalone bel-inkling2 executable is retained for fixed-token benchmarks and reference work. The llama C API is unchanged.

Performance

All figures below are freshly measured with the v0.8.0 release binaries and real prompts through bel-server. No archived figure is mixed with these runs. Hardware: RTX 3060 12 GB (SM86), i5-12400, 16 GB single-channel DDR4, Linux x86-64. Decoding is greedy and non-speculative.

Token generation

Short workloads generate 512 tokens each. The oracle adds expert prefetch only; it does not change the generated text.

WorkloadOracle enabledOracle disabled
LRU cache with TTL48.30 tok/s43.35 tok/s
Directed cycle detection47.82 tok/s43.99 tok/s
Race-condition reasoning49.99 tok/s46.25 tok/s
Token-bucket rate limiter48.42 tok/s43.76 tok/s
Serializability reasoning48.43 tok/s44.14 tok/s
Median48.42 tok/s43.99 tok/s
Mean48.59 tok/s44.50 tok/s
Peak49.99 tok/s46.25 tok/s
Coherent 16K source review, 128 generated47.05 tok/s44.70 tok/s

Prompt processing and startup

MeasurementOracle enabledOracle disabled
Server ready (process start to healthy)36.4 s39.6 s
Cold uncached 16K prefill949.4 tok/s833.6 tok/s
Cold first request, including one-time arena preparation33.2 s32.9 s
Warm uncached 16K prefill1,244.8 tok/s1,246.9 tok/s
Peak process RSS13,086.7 MiB13,137.2 MiB
Peak GPU memory11,832 MiB11,832 MiB

Warm uncached prefill processes the whole prompt again; cache_n was zero in both rows. It is not a KV cache hit. All six matched prompts produced identical SHA-256 output hashes with the oracle on and off. Full raw results, including per-prompt hashes, are in validation/RESULTS.md.

These are workload-specific measurements, not universal throughput guarantees. Historical development results are in docs/OPTIMISATION-MASTER.md and are not release measurements.

Build

Requirements: Linux x86-64, CMake 3.24+, a C++20 compiler and CUDA 12 or 13. SM86 is the validated target. Install ccache if using the compiler launcher options below. The bundled UI is disabled for a minimal build.

git clone https://github.com/Betelgeuse-AI/Betelgeuse.git
cd Betelgeuse
git checkout v0.8.0

cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DGGML_CUDA=ON \
  -DGGML_CUDA_ARCHITECTURES=86 \
  -DCMAKE_CUDA_ARCHITECTURES=86 \
  -DLLAMA_BUILD_INKLING2_ENGINE=ON \
  -DLLAMA_BUILD_SERVER=ON \
  -DLLAMA_BUILD_TESTS=OFF \
  -DLLAMA_BUILD_EXAMPLES=OFF \
  -DLLAMA_USE_PREBUILT_UI=OFF \
  -DLLAMA_BUILD_UI=OFF \
  -DCMAKE_C_COMPILER_LAUNCHER=ccache \
  -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
  -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache

cmake --build build --target bel-server bel-cli llama-ink2 -j

Expected binaries:

build/bin/
├── bel-server
├── bel-cli
└── bel-inkling2

The published binary archive is Linux x86-64 CUDA SM86 only. To build on another platform, use the same source checkout with the upstream build instructions and enable LLAMA_BUILD_INKLING2_ENGINE=ON with a CUDA backend where supported. Native Inkling execution has not been validated outside Linux SM86. The CPU routing oracle requires x86-64 with AVX-VNNI. See docs/betelgeuse.md for detailed requirements, environment variables, packaging and release validation commands.

Run

Point -m at the original Inkling 2 Mini checkpoint directory containing the safetensors shards and tokenizer. No intermediate GGUF conversion is required.

Server

Ordinary oracle-enabled decoding, the documented release configuration:

hf download Betelgeuse-AI/Inkling-2-Mini-Routing-Oracle \
  best_coda_tap01_i8.bin best_pre_tap6_i8.bin --local-dir ./inkling2-oracle

INK2_ORACLE=1 \
INK2_ORACLE_CODA="$PWD/inkling2-oracle/best_coda_tap01_i8.bin" \
INK2_ORACLE_PRE="$PWD/inkling2-oracle/best_pre_tap6_i8.bin" \
build/bin/bel-server -m <checkpoint-dir> -c 16896 -t 5 \
  --host 127.0.0.1 --port 8080 --no-webui \
  --cache-type-k q8_0 --cache-type-v q4_0 -fa on

Omit INK2_ORACLE=1 for ordinary decoding without the oracle. bel-server automatically selects the embedded native engine for the checkpoint directory. Streaming and repeated requests are supported. Oracle weights are loaded at runtime; replacing the two files needs no rebuild.

CLI

build/bin/bel-cli -m <checkpoint-dir> -c 1536 -t 5 \
  -p "Hello, my name is" -n 8 --no-display-prompt -st

Runtime tuning

The server enforces the tuned engine profile by default, with GPU fetch enabled. Experimental environment settings are ignored unless explicitly permitted.

Environment variablePurpose
INK2_ORACLE=1Enable the CPU routing oracle (off by default)
INK2_ORACLE_CODA / INK2_ORACLE_PREReplace oracle weight paths without rebuilding
INK2_ORACLE_TAUOracle threshold, default 0.22
INK2_ALLOW_TUNING_OVERRIDE=1Permit experimental tuning overrides
INK2_GPU_FETCH=0Disable GPU fetch when overrides are enabled
INK2_PIN_HOST_MIB=NConfigure pinned host memory when overrides are enabled

Leave the tuning overrides disabled for the documented release configuration. The oracle is the only opt-in feature included in the release line.

Architecture

The native Inkling engine differs from the original disk-paged GGUF runtime. Its main execution and memory-management components are:

  • Native mixed-precision weights. Original packed NVFP4 and MXFP8 expert weights and BF16 tensors are retained without extra weight quantisation.
  • Ampere execution kernels. Low-bit GEMV kernels for decode, packed FP16 tensor-core prefill and optimised BF16 projections. Native checkpoint support does not imply hardware-native FP4 or FP8 tensor-core instructions on Ampere.
  • Architecture-aware residency. Recurrent-core experts remain resident. Nonresident experts use a bounded GPU fetch cache with decayed-LFU eviction and overlapped PCIe transfers.
  • Dual-phase inference. Prefill workspace is reclaimed and reused for expert residency and decode without restarting the process or discarding KV and recurrent states.
  • Attention and state management. Fused grouped-query attention, sliding-window attention, dynamic KV growth, memory-aware pool resizing, CUDA graph reconstruction and K8/V4 KV-cache support.
  • Native execution. Full recurrent execution, original expert selection and GPU-side greedy sampling.
  • CPU routing oracle (opt-in). Two small AVX-VNNI INT8 predictors use otherwise idle PCIe windows to prefetch nonresident experts. Router decisions and model outputs are unchanged.
Original safetensors checkpoint
              │
     Native Inkling engine
              │
     Packed tensor-core prefill
              │
     Workspace reclamation
     KV / recurrent state retained
              │
     Decode residency and fetch cache
              │
     Low-bit GEMV + GPU sampling
              │
          Output tokens

Legacy models

The earlier Betelgeuse runtime explored out-of-core inference using NVMe expert paging, pinned host caches and bounded VRAM pools. These results remain part of the project's development history, but the corresponding models are deprecated in v0.7.0.

Historical modelHistorical decodeHistorical prefill
DeepSeek-V4.1-Flash (1017), 748B as documented18.92 tok/s61.80 tok/s
Alpha-Orionis-XS (Qwen3.8 Flash Next), ~125B22.03 tok/sNot separately certified

These figures came from warm historical workloads. DeepSeek used DSpark speculative decoding; Alpha-Orionis-XS used a repeated workload. Neither is directly comparable to the new non-speculative Inkling benchmarks.

For existing installations:

  • Keep a separate checkout and build of the revision previously validated with your model.
  • Do not assume old --moe-direct-io, expert-pack, profile or DSpark settings carry over to v0.7.0.
  • The stripped Alpha-Orionis-XS dense GGUF requires its matching legacy pager and companion files. It is not a standalone GGUF for upstream llama.cpp.
  • Consult the README from the corresponding historical revision for setup and benchmark methodology. No specific legacy tag is asserted here.

The Alpha-Orionis-XS model card remains a reference for the historical bundle and its applicable weight terms.

Current limitations

  • The first request can incur a one-time GPU-fetch preparation cost of roughly 11 seconds.
  • Throughput depends on expert locality, VRAM and host-memory bandwidth.
  • Longer contexts can reduce generation throughput.
  • Validation is concentrated on Linux x86-64 and NVIDIA Ampere SM86.
  • Preserving checkpoint weights does not guarantee bit-identical outputs across different execution and KV-cache precisions.
  • Experimental MLA/CISA, activation/target-weight quantisation, speculative decoding, heterogeneous verification and unfinished research features are not included in the reported native release configuration.
  • Only Linux x86-64 CUDA SM86 binaries are published. Windows and macOS builds are not validated or distributed; build from source on a supported platform.
  • Legacy model compatibility is not guaranteed. This release does not establish general compatibility with arbitrary MoE architectures.

Research handover

Development is paused and the validated implementation is shipped as-is. Remaining directions are million-token oracle training and distillation, speculative expert-union oracles, adaptive speculation, MLA attention acceleration, CISA retrieval correctness, longer-context validation and an optional compressed dense execution profile. Experimental branches and reports are preserved. See docs/research-handover.md for branch names, evidence and scope. No further optimisation was performed for this release.

See docs/OPTIMISATION-MASTER.md and RELEASE_NOTES.md for development history and release details.

Star history

Star History Chart

Licensing and acknowledgements

Betelgeuse builds on llama.cpp, ggml and native Inkling engine work contributed to Strata by baptisterajaut. Thanks to the developers of llama.cpp, Strata, Thinking Machines Lab and the wider local inference community.

The repository retains the upstream llama.cpp MIT licence and AUTHORS file. The Inkling engine carries tools/inkling2/LICENSE.Strata (MIT, copyright Niko1221 and the Strata contributors) and tools/inkling2/CONTRIBUTING.md. Packaged binaries include the required CUDA toolkit licence notices.

[!IMPORTANT] The engine's MIT licence does not cover model weights. Read the original checkpoint licence and any applicable redistribution terms independently. Betelgeuse is an independent project and does not imply endorsement by any upstream project or model provider.


Betelgeuse-AI/Betelgeuse

关于 About

A custom fork for frontier-scale mixture-of-experts inference on an RTX 3060 with 12 GB VRAM, 16 GB system RAM and local NVMe. Betelgeuse keeps dense computation on the GPU and brings routed experts into a bounded VRAM pool only when needed.

语言 Languages

C++55.2%
C15.7%
Python7.8%
Cuda6.6%
TypeScript4.4%
Svelte2.4%
HTML1.6%
Metal1.4%
Jinja1.1%
GLSL0.8%
Shell0.7%
CMake0.7%
WGSL0.5%
Go Template0.5%
Objective-C0.3%
Dockerfile0.1%
CSS0.1%
JavaScript0.1%
Nix0.1%
PowerShell0.0%
Linker Script0.0%
MDX0.0%
Makefile0.0%
Batchfile0.0%
SCSS0.0%
Assembly0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
5354
Total Commits
峰值: 182次/周
Less
More

核心贡献者 Contributors