Skip to main content

Piper Loader

End-to-end weight loading, multi-tier host/NVMe caching, GPU streaming, and online LoRA hot-swapping for Piper Engine.

  • Rust core + thin Python wrapper (maturin / PyO3), single wheel per OS covering Linux + Windows and NVIDIA (CUDA) + AMD (ROCm/HIP) via runtime dynamic loading of cudart / amdhip64 (no build-time GPU SDK).
  • Disk-native .safetensors ingestion (single + sharded index, file-identity fingerprinting, metadata-only FileSlice.reshape(), zero-read dim=0/dim=1 narrow/split with windowed sequential NVMe reads, and format-agnostic QuantizedSpec.narrow/split for SP/TP/EP sharding) plus optional in-memory CPU tensor registration.
  • Unified 3-tier HostStore shared across models and 2–4 local GPUs:
    • Tier 2a: Portable pre-pinned slab arena ranked by H2D transfer heat.
    • Tier 2b: Private pageable slab arena using remaining system RAM (critical for Windows WDDM and fast Diffusion ↔ LLM model switching).
    • Direct NVMe + Bounce Ring: Multi-threaded O_DIRECT / FILE_FLAG_NO_BUFFERING reads streamed through a sticky pre-pinned ring.
  • Two GPU loaders on one deli-ticket event ring:
    • ModelLoader + stream(blocks, loader, next=...) / use(module, loader) — module-first hybrid residency (load(vram_budget=None) for zero-overhead CUDA/HIP Graph all-resident mode, load(vram_budget=...), set_vram_budget, unload, and overlapped ping-pong streaming backed by HostStore.transfer_batch, with no hidden nn.Module hooks).
    • ExpertPool + MoESlotLayout — unified CUDA/HIP Graph-safe MoE pool covering full-VRAM (500+ TPS), hybrid exclusive VRAM + GPU-mapped pinned host (1.0x placement), and 0-VRAM modes through one load(vram_budget=...) / views() -> ExpertViews / unload() lifecycle, step-boundary promote() with pipelined spare-slot swaps (zero CPU memcpy, zero graph recapture, poison-on-failure recovery), zero-copy piper_kernels.ops.MoEWeights views, prefill scratch waves() streaming directly from pinned host, and pluggable Rust eviction policies (s3_fifo, w_tinylfu, lru).
  • Format-agnostic quantized & online adapter bridge: plugs into piper-kernels QuantizedWeight transcode and in-place multi-LoRA / dense / per-path strength / meta / broadcast merge with adapter_epoch hot-swap.
  • Single-process multi-GPU CollectiveGroup: bridges dynamic cudart / amdhip64 FFI (full-mesh P2P enablement, RAII mapped coherent pinned host buffers, and Windows WDDM stream flushes) with piper_kernels.collectives for CUDA/HIP Graph-safe 2–4 GPU all_reduce (including fused epilogues), reduce_scatter, all_gather, and barrier.

Development

See AGENTS.md for engineering rules and docs/development.md for full setup, review, and release instructions.

# Run pure-Rust core tests (CPU, uses FakeGpuRuntime)
cargo test --workspace

# Build & install Python extension into local uv venv
uv sync --dev
uv run maturin develop

# Run Python test suite, lint, and typecheck
uv run pytest tests -q
uv run ruff check .
uv run pyright

Metadata

Release files for piper-loader 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piper-loader 0.1.0
File Size Uploaded Provenance Actions
piper_loader-0.1.0.tar.gz 194.6 kB With provenance Details for piper_loader-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for piper-loader 0.1.0
File Interpreter ABI Platform Actions
piper_loader-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for piper_loader-0.1.0-cp314-cp314-win_amd64.whl
piper_loader-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for piper_loader-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl

Total release size: 1.3 MB

Release files / piper_loader-0.1.0.tar.gz

Download URL piper_loader-0.1.0.tar.gz
Size 194.6 kB
Tags Source
SHA-256 checksum
How to use checksums
26d052a24407a65aeaa5631f392d774aa598178024122dbe4e682f7282e31eb8
BLAKE2b-256 checksum
How to use checksums
52e764f0bee8d846c9fe49235e48ef90b3ef6139874667560a26c6d175eff38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / piper_loader-0.1.0-cp314-cp314-win_amd64.whl

Download URL piper_loader-0.1.0-cp314-cp314-win_amd64.whl
Size 486.9 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
dfb1ae3429139ffa003180e36b46781930036e65f6a8be8a39025e3501ef322f
BLAKE2b-256 checksum
How to use checksums
48e327b49a6f425080c30f9e932b057dc6023fc968a754754cd32a428fc54a90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / piper_loader-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL piper_loader-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 648.1 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3fbafc3910ec28cf83c2fcd652905a0c11116ce66945fdcd9e951f013d2624ff
BLAKE2b-256 checksum
How to use checksums
3469e59cbeb093e8cae30bc5a63e87fc2a1c39fdc17904019b55e3bca4719242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for piper-loader 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for piper_loader-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page