Skip to main content

Writing Inferlets

Work in Progress

This documentation is currently under development. Check back soon for comprehensive guides on writing inferlets.

Inferlets are lightweight WebAssembly programs that define custom inference logic in Pie. They give you fine-grained control over the generation process—tokenization, sampling, KV cache management, and more.

Overview

Inferlets can be written in any language that compiles to WebAssembly:

  • Rust (recommended)
  • Python (via Pie SDK)
  • Go
  • C/C++

Coming Soon

  • Getting started guide
  • API reference
  • Example inferlets
  • Best practices
  • Debugging tips

In the Meantime

Check out the Overview page for a high-level understanding of how inferlets fit into the Pie architecture, including a code example.

For questions or early access, join the discussion on GitHub.