Skip to content

Track vLLM tags through 0.29, and pin the bitsandbytes symbols - #10858

Merged
danielhanchen merged 12 commits into
mainfrom
extend-vllm-pinned-symbols
Sep 13, 2026
Merged

danielhanchen merged 12 commits into
mainfrom
extend-vllm-pinned-symbols

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

The tag list in this test stopped at v0.20.1 while vLLM is on 0.29.0, so nine minors went unchecked. vLLM 0.28 moved bitsandbytes out of tree to vllm-bnb-plugin inside that gap, import unsloth_zoo.vllm_utils started raising ModuleNotFoundError at module scope, and every fast_inference GRPO run on 0.28+ broke rather than only the 4-bit ones. Nothing here noticed, because the test was not looking at those versions.

What this adds

v0.21.0 through v0.29.0, and corrects v0.20.1 to v0.20.2, which is the real last patch of that minor.

Plus one new check: the bitsandbytes symbols unsloth_zoo patches must resolve from either the in-tree module or the plugin's compat module. That mirrors what unsloth_zoo now does (unslothai/unsloth-zoo#1197), so the test tracks the behaviour rather than a single hard-coded path.

The new test asserts less than it first did

My first version required BitsAndBytesConfig, BitsAndBytesLinearMethod, apply_bnb_4bit and is_layer_skipped_bnb, and failed on 21 of 24 tags. That was the test being wrong, not vLLM:

  • the in-tree module has never defined apply_bnb_4bit directly, and unsloth_zoo hasattr-checks it with a branch for each case
  • is_layer_skipped_bnb is assigned onto the module by unsloth_zoo, not read from it

So only BitsAndBytesConfig and BitsAndBytesLinearMethod are genuinely required, and those are what it asserts now.

Results

145 passed across all 24 tags

Worth noting: every pre-existing test in this file passes on the nine newly added tags. So the LoRA and config surface is stable over the whole 0.9.0 to 0.29.0 range, and bitsandbytes is the only thing that moved in it. That is a useful negative result, since it means the 0.28 break was a single relocation rather than broad drift.

Mutation-checked so it is not vacuous: pointing the symbol list at a name that exists nowhere fails all 24 tags.

mutant result: 24 failed, 121 deselected
mutation detected (test is not vacuous): True

Backed by real installs, not just tag reads

Separately from this static check, I built one uv venv per vLLM minor from 0.15.1 to 0.29.0, installed that exact vLLM, and asked unsloth_zoo to resolve and patch bitsandbytes for real. Sequential with the venv deleted between each, so only one exists at a time.

vllm     torch          import  bnb module                      patch  swap  restore
0.15.1   2.9.1+cu128    True    vllm...quantization.bitsandbytes  True  True  True
0.16.0   2.9.1+cu128    True    vllm...quantization.bitsandbytes  True  True  True
0.17.1   2.10.0+cu128   True    vllm...quantization.bitsandbytes  True  True  True
0.18.1   2.10.0+cu128   True    vllm...quantization.bitsandbytes  True  True  True
0.19.1   2.10.0+cu128   True    vllm...quantization.bitsandbytes  True  True  True
0.20.2   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.21.0   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.22.1   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.23.0   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.24.0   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.25.1   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.26.0   2.11.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.27.1   2.13.0+cu130   True    vllm...quantization.bitsandbytes  True  True  True
0.28.0   2.13.0+cu130   True    vllm_bnb_plugin.bitsandbytes      True  True  True
0.29.0   2.13.0+cu130   True    vllm_bnb_plugin.bitsandbytes      True  True  True

versions probed: 15   all green: True

patch is BitsAndBytesLinearMethod._apply_4bit_weight actually being replaced, swap and restore are the compute-dtype config being swapped and put back. The 0.28 and 0.29 rows need unslothai/unsloth-zoo#1197 plus vllm-bnb-plugin; every other row is unchanged behaviour.

danielhanchen and others added 4 commits September 13, 2026 08:52
The tag list stopped at v0.20.1 while vLLM is on 0.29.0, so nine minors went
unchecked. vLLM 0.28 moved bitsandbytes out of tree to vllm-bnb-plugin in
that gap, `import unsloth_zoo.vllm_utils` started raising
ModuleNotFoundError at module scope, and every fast_inference GRPO run on
0.28+ broke rather than only the 4-bit ones. Nothing here noticed.

Adds v0.21.0 through v0.29.0 (and corrects v0.20.1 to v0.20.2, the real last
patch of that minor), plus a check that the bnb symbols unsloth_zoo patches
resolve from EITHER the in-tree module or the plugin's compat module.

Only BitsAndBytesConfig and BitsAndBytesLinearMethod are asserted. My first
version of this also required apply_bnb_4bit and is_layer_skipped_bnb and
failed on 21 of 24 tags, which was the test being wrong rather than vLLM:
the in-tree module has never defined apply_bnb_4bit directly and unsloth_zoo
hasattr-checks it with a branch for each case, while is_layer_skipped_bnb is
assigned onto the module rather than read from it.

145 passed across all 24 tags. Every pre-existing test in the file passes on
the nine newly added ones, so the LoRA and config surface is stable over the
whole 0.9.0 to 0.29.0 range and bitsandbytes is the only thing that moved.

Mutation-checked: pointing the symbol list at a name that exists nowhere
fails all 24 tags, so the check is not vacuous.
The hand-kept tag list stopped testing the moment a new minor shipped, which is
how vLLM 0.28 moving bitsandbytes out of tree went unnoticed. Read the stable
releases from PyPI instead and cover every X.Y.Z from 0.9.0 on (38 tags today),
falling back to the checked-in list when PyPI is unreachable, skipping releases
that carry no git tag, and caching the raw fetches so the wider matrix does not
get rate limited.

Also assert WeightsMapper still exposes a helper for dropping the stacked
weight maps. vLLM 0.29.0 renamed get_unstacked_mapper to get_rename_mapper,
which silently fused q/k/v and gate/up during LoRA load and broke GRPO with
fast_inference=True.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-13T11:35:15.778528Z caa3c83 Manual request
🔒 Security Review ✅ Completed 2026-09-13T10:06:08.564947Z 92febf4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 92febf4466

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

…gistry

The fallback list used when PyPI is unreachable stopped at v0.20.2, so a run
with PyPI down and GitHub up skipped 0.21 through 0.29, including the 0.28
bitsandbytes relocation these guards exist for, and still reported green.

Also assert vLLM still exposes _CUSTOMIZED_METHOD_TO_QUANT_CONFIG: an
out-of-tree plugin registers the class object there, so unsloth_zoo has to
rewrite that entry and not only the module attribute.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 991c8cb0d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

shimmyshimmer and others added 2 commits September 13, 2026 11:01
Ref existence was probed by fetching README.md, so a rename or removal of that
one file read as a missing ref and the autouse fixture skipped the whole tag.
main is in the matrix precisely to catch drift before release, and it would
have gone silently unchecked. Ask the API about the ref itself, falling back
to the path probe only when the API cannot answer.

The out-of-tree bitsandbytes check also read the plugin's main, a moving
target: a fix landing there could pass for a release that lacks it, and a
breaking change there would fail every historical vLLM at once. Resolve the
published version from PyPI and check that tag, which is what a user installs.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

The three-component regex dropped stable hotfix releases: 0.9.0.1 and
0.10.1.1 are ordinary installable versions carrying real git tags, so the
matrix silently skipped two user-visible releases. Accept any all-numeric
version and keep every component, which takes the matrix from 37 tags to 39.

The plugin fallback also still pointed at main whenever PyPI was unreachable
or the released tag could not be read, which is the moving target the previous
round removed. Fall back to a released tag, and skip when no released ref
resolves rather than assert against whatever main happens to hold.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

_api_status returns None when the API cannot answer, and the callers tested
for != 404, so a rate-limited or unreachable API read as resolved. A PyPI
release whose git tag is missing or delayed would then be selected over the
known fallback, and every out-of-tree bitsandbytes case would fail on a raw
404 that says nothing about compatibility.

Require status 200, and fall back to the raw path probe when the status is
unknown. Both callers now share one _ref_resolves.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

The canary matched the identifier anywhere in the file, so swapping the
registry for a read-only mapping or a registry object would keep it green
while unsloth_zoo._set_registered_quant_config, which assigns by key, broke.
Match the binding itself and require a dict literal or dict().
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 13, 2026
@danielhanchen
danielhanchen merged commit 525a199 into main Sep 13, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants