Examples
Every inferlet listed in this section is a complete, runnable project under inferlets/ in the repo. Click the name on any sub-page to jump to the source.
Build and run any of them locally:
bakery build inferlets/chat-completion -o chat-completion.wasm
pie run --path ./chat-completion.wasm --manifest inferlets/chat-completion/Pie.toml -- --prompt "Write one sentence about Pie."
For a published version: pie run chat-completion -- --prompt "Write one sentence about Pie.".
Categories
- Chat and generation. Minimal text generation.
- Sampling and search. Logit primitives, ranking, adaptive sampling, watermarking, beam search, and contrastive decoding.
- Structured output. JSON Schema constrained decoding.
- Context and KV cache. Prefix sharing and bounded attention.
- Speculative decoding. Prompt lookup and native MTP drafting.
Each sub-page is a small table of inferlets plus a pointer to the Guide section that teaches the underlying primitive.
What you'll see
- Scope. Every example focuses on an inference-time algorithm rather than an application workflow.
- Language. The curated collection is Rust-only.
- Status. Each inferlet is a runnable reference implementation.