Skip to content
OpenTrain AIFor AI Companies

Amortizing intractable inference in large language models

Edward J. Hu, Moksh Jain, Eric Elmoznino, Younesse Kaddar, Guillaume Lajoie +2 morePublished Oct 6, 2023
arXiv PDF
Researcher verdict
Starting point
Use as implementation starting point
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
2
Review before use

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

Freshness tier: hot
Autoregressive large language models (LLMs) compress knowledge from their training data through next-token conditional distributions.

Implementation

Best maintained implementation now

Recommended
Confidence: High
Reproducibility: Limited

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

Why this implementation
Confidence: high

GFNOrg/gfn-lm-tuning is the strongest maintained implementation based on ranking signals. License is declared (MIT).

Open GFNOrg/gfn-lm-tuning
Reproduction risks
  • 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

Time to first repro: days
Last checked: Oct 25, 2026

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.
Open GFNOrg/gfn-lm-tuning

Hardware requirements

  • Expect multi-day setup/compute for meaningful reproduction based on current guidance.

Hugging Face artifacts

No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.

Datasets

No trustworthy datasets matches right now.

Search datasets on Hugging Face

Spaces

No trustworthy spaces matches right now.

Search spaces on Hugging Face

Research context

Tasks

Agentic tool use

Methods

Reinforcement learning

Domains

Natural Language Processing, Large Language Models, AI Agents

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.

Data includes links from Papers with Code ( CC-BY-SA-4.0 ).