Repository navigation
Track vLLM tags through 0.29, and pin the bitsandbytes symbols - #10858
Conversation
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.
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…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.
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
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.
_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.
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().
The tag list in this test stopped at
v0.20.1while vLLM is on 0.29.0, so nine minors went unchecked. vLLM 0.28 moved bitsandbytes out of tree tovllm-bnb-plugininside that gap,import unsloth_zoo.vllm_utilsstarted raisingModuleNotFoundErrorat module scope, and everyfast_inferenceGRPO 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.0throughv0.29.0, and correctsv0.20.1tov0.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_4bitandis_layer_skipped_bnb, and failed on 21 of 24 tags. That was the test being wrong, not vLLM:apply_bnb_4bitdirectly, and unsloth_zoohasattr-checks it with a branch for each caseis_layer_skipped_bnbis assigned onto the module by unsloth_zoo, not read from itSo only
BitsAndBytesConfigandBitsAndBytesLinearMethodare genuinely required, and those are what it asserts now.Results
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.
Backed by real installs, not just tag reads
Separately from this static check, I built one
uvvenv 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.patchisBitsAndBytesLinearMethod._apply_4bit_weightactually being replaced,swapandrestoreare the compute-dtype config being swapped and put back. The 0.28 and 0.29 rows need unslothai/unsloth-zoo#1197 plusvllm-bnb-plugin; every other row is unchanged behaviour.