pllm
SDK

Configuration

Load, inspect, and export a reproducible PLLM experiment configuration.

PLLM documentationView Markdown ↗

PLLM configuration objects describe public intent. Creating one does not download a model, contact a service, compile a plan, or create private material.

Inspect the included example with pllm config show:

uv run pllm config show examples/pllm.yaml

Export the normalized configuration as JSON with pllm config export:

uv run pllm config export examples/pllm.yaml --output /tmp/pllm-normalized.json

The exported file does not include credentials, live service handles, seeds, masks, or prepared material.

Python users can construct the same Experiment, Pipeline, Model, Deployment, and ExecutionBudget objects directly. See the generated Python API inventory for exact signatures. MaskedLinearCpu binds the two-role public-weight baseline. ProprietaryGuarded, ProprietaryBlinded, and DirectFHEProfile bind the shipped one-role proprietary engines, including guarded policy parameters; they do not imply protected research execution, model-extraction resistance, or a plaintext reference backend.

Python SDK example

from pllm import MaskedLinearCpu, Model, TinyModel
from pllm.kernels import Cpu

model = Model("Qwen/Qwen2.5-0.5B-Instruct")
assert model.to_spec() == {"source": "Qwen/Qwen2.5-0.5B-Instruct"}

pinned = Model.hf(
    "Qwen/Qwen2.5-0.5B-Instruct",
    revision="7ae557604adf67be50417f59c2c2f167def9a775",
)
assert pinned.kind == "huggingface"
assert pinned.revision is not None
assert isinstance(Model.tiny(), TinyModel)

pipeline = MaskedLinearCpu(model, kernels=Cpu(threads=4))
assert pipeline.profile == "baseline.masked_linear_cpu"
assert pipeline.with_params(kernels__threads=8).kernels.params["threads"] == 8

API: Python SDK objects and signatures

On this page

Loading documentation index…

Search runs locally in this browser.