Leone is a research LLM inference engine for consumer GPUs. It uses a Rust runtime and handwritten CUDA kernels. The measured target is an NVIDIA RTX 4090.
The server batches active decode rows into shared matrix operations. Each request keeps separate attention, sampling, cancellation, and session state. Prefill yields between chunks so other admitted requests can continue decode. KV admission uses fixed token pages and returns typed overload errors before the configured capacity is exceeded.
Q4_K and Q6_K weights on the CPU and CUDA backends.f32, f16, and q8 KV cache storage.Each kernel has a scalar reference path. See the oracle contract and the speculation contract.
| Area | Support |
|---|---|
| Measured GPU | NVIDIA SM89 |
| Correctness target | SM89 and SM120 |
| Model families | Dense Qwen3 and Llama 3 |
| Weight formats | Q4_K, Q6_K |
| Workload | Concurrent text requests, batch-1 per request |
| Server | Local HTTP, documented OpenAI chat subset |
| Other GPU vendors | Not implemented |
| Vision and MoE | Metadata probe only |
Before inference, run leone doctor -m model.gguf. The command reports the
architecture, tensor formats, backend support, and model limits without loading
all weights.
Binary packages support Linux x86_64. They require a supported NVIDIA GPU, CUDA, and cuBLAS. Windows and macOS packages are not available.
Install an extracted binary archive with:
./install.sh
The OpenAI Python client can use the HTTP endpoint. Leone has no Python runtime API. Crates are not published as part of the binary release.
Rust 1.92, CUDA, cuBLAS, and a supported NVIDIA GPU are required.
cargo +1.92 build --release -p leone-cli
./target/release/leone doctor -m model.gguf
The local release gate runs on SM89, an RTX 4090. SM120 is a correctness and non-regression target. It is not validated locally.
./target/release/leone generate \
-m model.gguf \
-p 'State one invariant of exact speculative decoding.' \
-n 64
Use --backend cpu for the scalar runtime. Use --kv q8 to reduce KV storage.
Run leone generate --help for all controls.
./target/release/leone serve \
-m model.gguf \
--bind 127.0.0.1:8080 \
--sessions 8 \
--batch-size 8 \
--session-store .leone-sessions
curl http://127.0.0.1:8080/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"leone","messages":[{"role":"user","content":"Define KV reuse."}]}'
The server binds to loopback by default. A non-loopback address requires
--allow-remote. The server does not provide authentication or TLS.
--batch-size limits the requests selected for one decode pass. --sessions
limits resident KV state. Explicit draft settings run outside the shared batch
path. Adaptive speculation is opt-in.
See the OpenAI API subset and the Python client check.
The streaming comparison reports latency, throughput, resident progress, physical memory, and common-oracle quality.
Correctness gates compare CUDA results with independent CPU oracles. The batched-service study compares shared decode with the same concurrent workload at a batch limit of one.
taskset -c 16-31 cargo +1.92 test --workspace
taskset -c 16-31 cargo +1.92 test --release -- --ignored --test-threads=1
Timing studies use physical performance cores and an otherwise idle GPU:
taskset -c 0-3,12-15 scripts/study-batched-service.sh \
model.gguf plans/qwen3-8b-sm89.json quality.json study.json
The generated release evidence states the tested model, workload, results, and limits.
The release gate defines the publication checks. A failed gate delays the release.
The project is dual-licensed under Apache-2.0 and MIT.
8 commits
Rust
79.4%
Cuda
9.9%
Python
6.8%
Shell
3.2%
Leone is a research LLM inference engine for consumer GPUs. It uses a Rust runtime and handwritten CUDA kernels. The measured target is an NVIDIA RTX 4090.
The server batches active decode rows into shared matrix operations. Each request keeps separate attention, sampling, cancellation, and session state. Prefill yields between chunks so other admitted requests can continue decode. KV admission uses fixed token pages and returns typed overload errors before the configured capacity is exceeded.
Q4_K and Q6_K weights on the CPU and CUDA backends.f32, f16, and q8 KV cache storage.Each kernel has a scalar reference path. See the oracle contract and the speculation contract.
| Area | Support |
|---|---|
| Measured GPU | NVIDIA SM89 |
| Correctness target | SM89 and SM120 |
| Model families | Dense Qwen3 and Llama 3 |
| Weight formats | Q4_K, Q6_K |
| Workload | Concurrent text requests, batch-1 per request |
| Server | Local HTTP, documented OpenAI chat subset |
| Other GPU vendors | Not implemented |
| Vision and MoE | Metadata probe only |
Before inference, run leone doctor -m model.gguf. The command reports the
architecture, tensor formats, backend support, and model limits without loading
all weights.
Binary packages support Linux x86_64. They require a supported NVIDIA GPU, CUDA, and cuBLAS. Windows and macOS packages are not available.
Install an extracted binary archive with:
./install.sh
The OpenAI Python client can use the HTTP endpoint. Leone has no Python runtime API. Crates are not published as part of the binary release.
Rust 1.92, CUDA, cuBLAS, and a supported NVIDIA GPU are required.
cargo +1.92 build --release -p leone-cli
./target/release/leone doctor -m model.gguf
The local release gate runs on SM89, an RTX 4090. SM120 is a correctness and non-regression target. It is not validated locally.
./target/release/leone generate \
-m model.gguf \
-p 'State one invariant of exact speculative decoding.' \
-n 64
Use --backend cpu for the scalar runtime. Use --kv q8 to reduce KV storage.
Run leone generate --help for all controls.
./target/release/leone serve \
-m model.gguf \
--bind 127.0.0.1:8080 \
--sessions 8 \
--batch-size 8 \
--session-store .leone-sessions
curl http://127.0.0.1:8080/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"leone","messages":[{"role":"user","content":"Define KV reuse."}]}'
The server binds to loopback by default. A non-loopback address requires
--allow-remote. The server does not provide authentication or TLS.
--batch-size limits the requests selected for one decode pass. --sessions
limits resident KV state. Explicit draft settings run outside the shared batch
path. Adaptive speculation is opt-in.
See the OpenAI API subset and the Python client check.
The streaming comparison reports latency, throughput, resident progress, physical memory, and common-oracle quality.
Correctness gates compare CUDA results with independent CPU oracles. The batched-service study compares shared decode with the same concurrent workload at a batch limit of one.
taskset -c 16-31 cargo +1.92 test --workspace
taskset -c 16-31 cargo +1.92 test --release -- --ignored --test-threads=1
Timing studies use physical performance cores and an otherwise idle GPU:
taskset -c 0-3,12-15 scripts/study-batched-service.sh \
model.gguf plans/qwen3-8b-sm89.json quality.json study.json
The generated release evidence states the tested model, workload, results, and limits.
The release gate defines the publication checks. A failed gate delays the release.
The project is dual-licensed under Apache-2.0 and MIT.
8 commits
Rust
79.4%
Cuda
9.9%
Python
6.8%
Shell
3.2%