Models
See which model configurations PLLM can describe and what model support does not yet include.
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.
| Adapter | Validated configuration scope | Added semantics |
|---|---|---|
pllm.qwen2.v1 | dense Qwen2 configuration contract | grouped-query attention, rotary position, gated SiLU MLP, KV state |
pllm.qwen3.v1 | dense Qwen3; pinned mini-coder-4b fixture | explicit head width, Q/K normalization, bias-free attention |
pllm.qwen3_5_text.v1 | pinned Qwen3.5-4B text decoder | hybrid full attention and gated-delta recurrence, convolution and recurrent state |
pllm.phi4_mini.v1 | pinned Phi-4-mini-instruct decoder | fused QKV, fused gate/up, partial LongRoPE |
pllm.gemma4_e2b_text.v1 | pinned Gemma 4 E2B text decoder | hybrid attention, shared KV suffix, double-wide suffix MLP |
pllm.gemma4_e4b_text.v1 | pinned Gemma 4 E4B text decoder | hybrid 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"} <= operatorsAPI: 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.