For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Power/v0.9.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Power/v0.9.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Power/v0.9.0/en/index.md.
  • English
  • v0.9.0
  • You define the model.Power runs it.

    Run language, vision, OCR, embedding, and audio models inside a Rust process or behind an API. Power handles devices, queues, weights, and execution records without rewriting model logic.

    $cargo add a3s-power --no-default-features -F embedded-inference
    3
    CPU, CUDA, and Metal devices
    4
    backend and embedded paths
    Q6_K
    active target acceptance
    Verify more tokens per forward passMTP · K7 / S7

    One runtime. Three hard guarantees.

    Resources stay bounded

    Power checks memory, devices, and queues before execution. It rejects work that cannot fit instead of hiding a fallback.

    Results stay traceable

    Model, configuration, device, input, and output are bound into one execution receipt that can be checked later.

    Callers set the bar

    Clients verify against their own hashes and policy. The server cannot quietly relax the acceptance rules.

    Speed comes from the whole execution path.

    Power does not hide performance behind a vague fast-mode switch. Graphs, tensors, speculation, scheduling, and weights are tuned separately, with an exact fallback for every fast path.

    See every optimization

    Graphs and kernels

    Owned byModel + backend

    Fix the common shapes, reuse CUDA Graphs, then choose Flash Attention and fused kernels for the batch that actually runs.

    • Finite shapes
    • CUDA Graph
    • Flash Attention
    • Kernel fusion

    Tensor path

    Owned byPower

    Merge small calls, pass device-resident results between adjacent graphs, and copy once at the final output.

    • Microbatching
    • Tensor batches
    • Device residency
    • One copy

    Speculative decoding

    Owned byPower + backend

    The draft guesses and the target model checks. Only matching tokens are committed; a mismatch returns to the last correct position.

    • Target verification
    • K / S shapes
    • MTP / FR
    • Exact rollback

    Scheduling and replicas

    Owned byPower + host

    Queues, continuous batches, and session replicas share one device budget. The host adds GPU priority and CPU affinity.

    • Device admission
    • Continuous batching
    • Session replicas
    • Host scheduling

    Weights and residency

    Owned byPower

    Read on demand, prefetch, and keep hot weights resident. When cache space runs out, fall back to the original artifact without changing tensor identity.

    • LFRU
    • Async prefetch
    • Residency plans
    • Partial mirrors

    Validation before rollout

    Owned byPower + client

    Run old and new settings in both orders on the same input. Replace the old path only when speed improves, output matches, and quality passes.

    • Two-order A/B
    • Output parity
    • Quality gates
    • Hardware record

    One RTX 4090. One reproducible result.

    Qwen3.8-27B · untouched Q6_K · peak revision da2c1dd · quality revision 64aef15

    Reproduce these numbers
    174.413
    median Q6_K steady decode token/s
    41.035
    request-wide token/s on the MTP quality workload
    73.57%
    request-wide gain over autoregressive
    6 / 6
    quality runs passed GPU exclusivity checks
    ModeQuality evidenceRequest-wide t/sSteady t/s
    Q6_K / AR · 3×10067 / 6023.642
    Q6_K + MTP / full · 3×100CURRENT67 / 5841.035
    Q6_K + MTP / FR · K7/S6/B11Matching digest174.413

    174.413 token/s is the median of nine 1,024-token steady-decode runs; the 172.723 minimum does not establish a 175 token/s service floor. MTP was 1.736× faster on the 3×100 quality workload, but strict score moved from 60/100 to 58/100, so it is not a lossless default.

    Use Power your way.

    Rust library

    Embed it in your process

    No listener and no child process. Model code uses devices, queues, state, and execution receipts directly.

    embedded-inference
    Inference service

    Keep your existing clients

    Use an OpenAI-compatible API for chat, completions, embeddings, and model management, with RA-TLS or vsock when needed.

    server + backend
    Artifact install

    Put models on disk safely

    Stream the model, verify size and SHA-256, then commit it once under a cross-process lock.

    artifact-provisioning

    Power runs the model. It does not redefine it.

    Model crates own topology, tokenization, preprocessing, and quality policy. Power supplies devices, scheduling, integrity, privacy, and verification, so a new model does not require a new runtime core.

    See the architecture boundary
    1. ADMITDo memory and queue capacity fit?
    2. EXECUTEWhich device path runs this request?
    3. COMMITWhat does this output bind?
    4. ACCEPTDoes the caller accept it?

    Start with one model.

    Embed the runtime or launch the OpenAI-compatible service. Performance tuning and execution verification use the same interfaces when you need them.
    Get started View source