pllm
SDK
Pythonpllm

pllm.native Python API

Public objects, practical usage, and research context for pllm.native.

PLLM documentationView Markdown ↗

Native APIs inspect the installed Rust backend and compile reusable integer matrix stages with explicit owned storage and conversion boundaries. Presence documents API availability, not complete model, security, or deployment coverage; check implementation status before relying on a path.

Research context

This API is project infrastructure rather than an implementation of one specific paper. Relevant method pages link their primary sources separately.

Python SDK example

The example performs a bounded offline task and checks an observable result. It does not download a checkpoint or contact a provider.

import pllm.native as native

details = native.capabilities()
assert details["implementation"] == "rust"
assert details["matrix_storage"] == "owned-int8"

API: pllm.native

Objects and signatures

capabilities

Performs the capabilities operation for the workflow where native apis inspect the installed rust backend and compile reusable integer matrix stages with explicit owned storage and conversion boundaries.

  • Canonical object: pllm.runtime._native_support.capabilities
  • Kind: function
  • Signature/type: () -> 'dict'
  • Public exports: pllm.native.capabilities

CompiledMatrix

An immutable matrix snapshot. Recompile explicitly after changing weights.

  • Canonical object: pllm.runtime.native.CompiledMatrix
  • Kind: class
  • Signature/type: (owner: "'MaskedGEMM'", weights: 'np.ndarray')
  • Public exports: pllm.native.CompiledMatrix
  • Public members: clear(self, inputs: 'np.ndarray') -> 'np.ndarray'; coefficients(self, inputs: 'np.ndarray', modulus: 'int') -> 'np.ndarray'; modular(self, inputs: 'np.ndarray', modulus: 'int') -> 'np.ndarray'; wrap32(self, inputs: 'np.ndarray') -> 'np.ndarray'; wrap64(self, inputs: 'np.ndarray') -> 'np.ndarray'

MaskedGEMM

Exact modular kernels. Use compile() once for each immutable model stage.

  • Canonical object: pllm.runtime.native.MaskedGEMM
  • Kind: class
  • Signature/type: (library: 'str \| Path \| None' = None, *, threads: 'int' = 0, build: 'bool' = True, simd: 'bool' = True) -> 'None'
  • Public exports: pllm.native.MaskedGEMM
  • Public members: clear(self, weights, inputs); coefficients(self, weights, inputs, modulus); compile(self, weights: 'np.ndarray') -> 'CompiledMatrix'; modular(self, weights, inputs, modulus); modular_limb12(self, weights, inputs, modulus); property available: 'bool'; property backend: 'str'; property native: 'bool'; wrap32(self, weights, inputs); wrap64(self, weights, inputs)

Loading documentation index…

Search runs locally in this browser.