pllm
SDK
Pythonpllm

pllm.passes Python API

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

PLLM documentationView Markdown ↗

Graph passes transform semantic plans under explicit state and lifecycle contracts rather than rewriting adapter-specific operation names. Presence documents API availability, not complete model, security, or deployment coverage; check implementation status before relying on a path.

Research context

Relevant design inputs: MPCache. PLLM's implementation and evidence claims remain independent.

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.passes as passes
cache = passes.KvCacheEviction(cluster_sizes=(32, 16), share_adjacent_layers=True)
assert cache.get_params()["implementation"] == "pllm/importance-kv-cache-eviction/v1"

API: pllm.passes

Objects and signatures

KvCacheEviction

Selects component pllm/kv-cache-eviction during model-lowering; it provides bounded-kv-cache-eviction.

  • Canonical object: pllm.passes.KvCacheEviction
  • Kind: class
  • Signature/type: __init__(self, *, implementation: str='pllm/importance-kv-cache-eviction/v1', observation_window: tuple[int, int] \| Mapping[str, int]=(1, 5), static_keep: tuple[int, int] \| Mapping[str, int]=(3, 10), dynamic_keep: tuple[int, int] \| Mapping[str, int]=(1, 4), alpha: tuple[int, int] \| Mapping[str, int]=(3, 5), cluster_sizes: Sequence[int]=(32, 16), share_adjacent_layers: bool=True) -> None
  • Public exports: pllm.KvCacheEviction, pllm.passes.KvCacheEviction
  • Public members: descriptor: ComponentDescriptor; __init__(self, *, implementation: str='pllm/importance-kv-cache-eviction/v1', observation_window: tuple[int, int] \| Mapping[str, int]=(1, 5), static_keep: tuple[int, int] \| Mapping[str, int]=(3, 10), dynamic_keep: tuple[int, int] \| Mapping[str, int]=(1, 4), alpha: tuple[int, int] \| Mapping[str, int]=(3, 5), cluster_sizes: Sequence[int]=(32, 16), share_adjacent_layers: bool=True) -> None; classmethod describe(cls) -> ComponentDescriptor

PlanPass

Immutable PlanPass record carrying component, params for the workflow where graph passes transform semantic plans under explicit state and lifecycle contracts rather than rewriting adapter-specific operation names.

  • Canonical object: pllm.passes.PlanPass
  • Kind: class
  • Signature/type: constructor not exposed
  • Public exports: pllm.passes.PlanPass

Loading documentation index…

Search runs locally in this browser.