pllm
SDK
ProtocolsGarbling

Garbling

Reference arithmetic and Boolean garbling components with explicit maturity and composition boundaries.

PLLM documentationView Markdown ↗

Garbling is a family of representations and protocols, not one interchangeable backend. PLLM records arithmetic projection gates, Boolean half-gates, lookup tables, and weighted paths separately because their domains, costs, proofs, and conversion obligations differ.

Current clean-room arithmetic components execute bounded protected Q7 regions in the native reference path, but no shipped typed profile composes them into a whole decoder. They remain unreviewed and cannot support production-security claims. See research reproductions for the promotion gates.

Methods and schedules are separate choices

A nonlinear method chooses the gated-multiply construction. A scheduler chooses how tensor lanes are grouped and consumed. Both identities are authenticated into one-use material and plan provenance, so changing either choice changes the candidate. These public Python classes are immutable selectors; native reference bindings may still expose opaque evaluator payloads internally, so selection alone is not a process-isolation or production-security boundary.

API: Nonlinear objects and signatures

Python SDK example

Use BinaryTableGatedMultiplyQ7

BinaryTableGatedMultiplyQ7 represents SiLU(gate) * up with the bounded binary-table method. The lookup-table guide explains the encoded domain and why this is not a generic nonlinear lookup.

from pllm.nonlinear import BinaryTableGatedMultiplyQ7

method = BinaryTableGatedMultiplyQ7()
candidate = {"method": method.to_spec()}
assert candidate["method"]["component"] == "pllm/binary-table/v1"

Use R03CrtGatedMultiplyQ7

R03CrtGatedMultiplyQ7 selects mixed-modulus CRT projection gates derived from the R03 method record. The arithmetic guide covers the exact moduli, conversions, and maturity boundary.

from pllm.nonlinear import R03CrtGatedMultiplyQ7

method = R03CrtGatedMultiplyQ7()
candidate = {"method": method.to_spec()}
assert candidate["method"]["component"] == "pllm/r03-crt/v1"

Consume one ScalarProtectedTensorSchedule scalar at a time

ScalarProtectedTensorSchedule binds one independent scalar lane. Use it for the smallest reference evaluations, where batching would obscure the material lifecycle.

from pllm.schedulers import ScalarProtectedTensorSchedule

schedule = ScalarProtectedTensorSchedule()
candidate = {"scheduler": schedule.to_spec()}
assert candidate["scheduler"]["component"] == "pllm/scalar/v1"

Authenticate an IndependentLanesProtectedTensorSchedule bundle

IndependentLanesProtectedTensorSchedule groups two to four lanes while preserving independent material per lane. The entire bundle is authenticated and burned atomically.

from pllm.schedulers import IndependentLanesProtectedTensorSchedule

schedule = IndependentLanesProtectedTensorSchedule(max_elements=4)
candidate = {"scheduler": schedule.to_spec()}
assert candidate["scheduler"]["params"] == {"max_elements": 4}

Stream with ChunkedIndependentLanesProtectedTensorSchedule

ChunkedIndependentLanesProtectedTensorSchedule extends independent lanes to larger tensors with an explicit upper bound. This is the schedule used by bounded tensor reference work, not an unlimited stream.

from pllm.nonlinear import R03CrtGatedMultiplyQ7
from pllm.schedulers import ChunkedIndependentLanesProtectedTensorSchedule

candidate = {
    "method": R03CrtGatedMultiplyQ7().to_spec(),
    "scheduler": ChunkedIndependentLanesProtectedTensorSchedule(
        max_elements=64,
    ).to_spec(),
}
assert candidate["method"]["component"] == "pllm/r03-crt/v1"
assert candidate["scheduler"]["params"] == {"max_elements": 64}

The candidate above demonstrates the orthogonal pairing only. It does not issue material or imply complete-model coverage, cryptographic review, or deployment assurance. Continue to compiler components to see where these choices enter planning.

Loading documentation index…

Search runs locally in this browser.