Amortizing intractable inference in large language models
Abstract
Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.
Autoregressive large language models (LLMs) compress knowledge from their training data through next-token conditional distributions. This limits tractable querying of this knowledge to start-to-end autoregressive sampling. However, many tasks of interest -- including sequence continuation, infilling, and other forms of constrained generation -- involve sampling from intractable posterior distributions. We address this limitation by using amortized Bayesian inference to sample from these intractable posteriors. Such amortization is algorithmically achieved by fine-tuning LLMs via diversity-seeking reinforcement learning algorithms: generative flow networks (GFlowNets). We empirically demonstrate that this distribution-matching paradigm of LLM fine-tuning can serve as an effective alternative to maximum-likelihood training and reward-maximizing policy optimization. As an important application, we interpret chain-of-thought reasoning as a latent variable modeling problem and demonstrate that our approach enables data-efficient adaptation of LLMs to tasks that require multi-step rationalization and tool use.
Results and benchmarks
Autoregressive large language models (LLMs) compress knowledge from their training data through next-token conditional distributions.
Benchmark evidence is limited
Evidence graph: 4 refs, 4 links.
Utility signals: depth 65/100, grounding 85/100, status medium.
Implementation
Best maintained implementation now
GFNOrg/gfn-lm-tuning
193 stars · 22 forks · Last push Aug 30, 2026 · MIT license
- License
- CI
- Dependencies
- Docker
Official implementation from Papers with Code · Repository link is mentioned in the paper metadata · Matched via arXiv identifier search
GFNOrg/gfn-lm-tuning is the strongest maintained implementation based on ranking signals. License is declared (MIT).
Open GFNOrg/gfn-lm-tuning- No CI workflows detected
- Dependency manifest is missing
- Selected GFNOrg/gfn-lm-tuning as the strongest maintained implementation for new work.
- Repository activity is within the last 24 months.
Reproduction readiness
Major work
No dependency manifest, manual reconstruction required
- GFNOrg/gfn-lm-tuning has no requirements.txt, environment.yml, pyproject.toml, or Dockerfile.
- You will need to reverse-engineer dependencies from import statements in the source code.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Validation caveat
Hugging Face artifacts
No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.
Models
- local-inference-lab/Qwen3.8-Flash-Next-NVFP4
71,225 downloads · 55 likes
- local-inference-lab/GLM-5.3-Flash-NVFP4
5,154 downloads · 44 likes
- local-inference-lab/GLM-5.3-Flash-NVFP4-Spark
11,920 downloads · 17 likes
Datasets
No trustworthy datasets matches right now.
Search datasets on Hugging FaceSpaces
No trustworthy spaces matches right now.
Search spaces on Hugging FaceResearch context
Tasks
Agentic tool use
Methods
Reinforcement learning
Domains
Natural Language Processing, Large Language Models, AI Agents
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).