pllm
SDK
Models

Models

See which model configurations PLLM can describe and what model support does not yet include.

PLLM documentationView Markdown ↗

pllm.lower_model(config, batch=..., max_input_tokens=..., max_new_tokens=...) turns model configuration and workload limits into a ModelPlan. It does not download weights or tokenizers, choose a device, or start a runtime.

Each adapter validates a specific architecture and produces the same model-neutral plan format. The plan records operators, layers, weight references, persistent state, workload limits, and source identity. When a new model needs a new operation, PLLM extends the shared vocabulary instead of adding model-specific logic to the compiler.

AdapterValidated configuration scopeAdded semantics
pllm.qwen2.v1dense Qwen2 configuration contractgrouped-query attention, rotary position, gated SiLU MLP, KV state
pllm.qwen3.v1dense Qwen3; pinned mini-coder-4b fixtureexplicit head width, Q/K normalization, bias-free attention
pllm.qwen3_5_text.v1pinned Qwen3.5-4B text decoderhybrid full attention and gated-delta recurrence, convolution and recurrent state
pllm.phi4_mini.v1pinned Phi-4-mini-instruct decoderfused QKV, fused gate/up, partial LongRoPE
pllm.gemma4_e2b_text.v1pinned Gemma 4 E2B text decoderhybrid attention, shared KV suffix, double-wide suffix MLP
pllm.gemma4_e4b_text.v1pinned Gemma 4 E4B text decoderhybrid attention, shared KV suffix, PLE, softcap

Describing a model is not the same as loading its checkpoint or running it privately. Compiler support, output quality, benchmarks, and deployment are also separate. Check current support before choosing a model.

Python SDK example

from pathlib import Path

from pllm import lower_model

fixture = Path("crates/pllm-models/tests/fixtures/mini-coder-4b-c87892d-config.json")
plan = lower_model(fixture.read_bytes(), batch=1, max_input_tokens=16, max_new_tokens=4)
operators = {operation["operator"] for operation in plan.prefill["operations"]}
assert {"rotary_embedding", "silu", "kv_cache_append"} <= operators

API: Python SDK objects and signatures

Run this example from a PLLM source checkout; package installations do not include the checked-in fixture. This creates a semantic plan only.

On this page

Loading documentation index…

Search runs locally in this browser.