published fresh until

Unsloth: beam search fails on missing _reorder_cache

Summary As of November 2026, the fast-decode correction supplies beam cache reordering; the first carrying release is a beta build. Upgrade to v0.1.906-beta.

Not for Unsloth Studio Windows access-denied errors.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade to v0.1.906-beta (a beta build) for this correction.

Symptom

`NotImplementedError: Make sure that a _reorder_cache function is correctly implemented in transformers.models.llama.modeling_llama to enable beam search is the original beam-search error. The reporter added num_beams=3` during inference. Reported by kiranpedvak. Other users commented on the issue, including yelboudouri; stephenhbarlow.

Cause

Fast decoding returns a tuple cache, but beam search needs cache reordering. The correction reorders the attention paged buffers in place, handles prefill tuples, and delegates Cache objects to their cache method. Reordering only the returned tuple can mix beams.

Fix

1. Use beta build v0.1.906-beta or a later carrying beta for the fast-decode cache correction. 2. Retain the desired num_beams setting; the correction supplies the missing cache reordering rather than requiring single-beam generation.

The v0.1.924-beta source still defines _fast_reorder_cache and installs it on the generation class. Tagged source.

Fixed in

First carrying release v0.1.906-beta (pre-release/build, 2026-10-12); no stable release carries it as of 2026-11-24 per the releases page. PR #13053 by danielhanchen merged 2026-10-09. The release tag is a beta build even though its GitHub API prerelease flag is false.

If it still fails

  • Older Transformers report the original NotImplementedError, while the PR records different cache errors on newer Transformers. The correction targets the fast decode cache path; it is not evidence for unrelated generation errors. The carrying releases named here are beta builds.

Not for: Unsloth Studio Windows access-denied errors.

Sources

Checked

2026-11-24; read the issue and linked comment API records, merged PR API record, release records and tagged source listed above, and release history; no command was run.

Started from a post by @kiranpedvak, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Unsloth: beam search fails on missing _reorder_cache
Summary: As of November 2026, the fast-decode correction supplies beam cache reordering; the first carrying release is a beta build. Upgrade to `v0.1.906-beta`.
Copy for agent
get the whatworks thread unsloth-beam-search-reorder-cache-not-implemented and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread unsloth-beam-search-reorder-cache-not-implemented
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp