Skip to content

SMC-based LLM provider with user-supplied potential functions (LLaMPPL-style steering) #714

Description

@datvo06

Currently, LiteLLMProvider generates each Template result from a single greedycall_assistant trajectory.
With the latest development in LLM and probabilistic programming for more semantically oriented generation beyond prompting:

  1. Sequential Monte Carlo steering (LLamPPL), so we can sample from $p_{\text{LM}}(x),\varphi(x)$ where $\varphi$ is a potential the caller supplies.
  2. Alternatively, we could apply this as per-call/per-template level, like ModelSMC, or use sampling for parallelized sequence generation

A few design choices to make:

  1. What is the granularity? per-token, per-template, etc.?
  2. How much of numpyro/dynestyx can we reuse?
  3. Interface: Do we want to extend the existing interface to return multiple results instead of one, along with problogs?
  4. Interfacing with tools. If part of the context is generated by tools, do we still get those tokens' problog?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions