Repository navigation
feat(convert): allow fixed Unsloth maps without imatrix - #99
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_6391df47-ba78-43bf-9ebc-ca5281156021) |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d37ac4fde
ℹ️ 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".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_13c3f5af-61dd-492b-a5c5-5c361c456633) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28636f9fdb
ℹ️ 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".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ad248a0f-530f-4850-9b07-dc91f7e2aff9) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3f37a8b5-afe7-46de-92ed-1890f8e3e761) |
Summary
--imatrix-pathWhy
The fixed Unsloth class maps are deterministic, but the converter previously rejected every Unsloth invocation without an imatrix. That blocked compatible checkpoints which do not publish calibration data. Simply removing the early check would be unsafe because unsupported or ambiguous inputs could silently fall back to the legacy Dynamic 2.0 predicate without AWQ calibration.
This change only defers the imatrix requirement for
--q-mxfpand--q-mode nvfp4, then requires the backend's existing Qwen family and hybrid-shape verification to select an official map. All other no-imatrix Unsloth requests still fail.Validation
yarn vp test packages/cli/__test__/convert-cmd.test.ts --run— 19 passedcargo test -p mlx-core unsloth_no_imatrix --lib— 3 passedyarn typecheckcargo fmt --all -- --checkgit diff --checkNote
Medium Risk
Changes quantization validation and conversion entry points across Rust and CLI; incorrect gating could reject valid converts or allow low-quality legacy Unsloth without calibration, but scope is limited to convert tooling rather than runtime inference or auth.
Overview
Unsloth without calibration is now allowed only for the verified official Qwen3.5/Qwen3.6 fixed class maps (
--q-mxfpor--q-mode nvfp4). Legacy affine--q-recipe unslothstill requires--imatrix-path.The converter adds early and late imatrix gates in
convert.rs(shared by SafeTensors and GGUF): defer fixed-map requests at the CLI, then fail closed if family/shape verification does not select an official map—so callers cannot silently fall back to legacy Dynamic 2.0 without AWQ. Official-map selection runs before model-specific branches (e.g. privacy-filter) so dedicated predicates cannot skip that check. A warning is emitted when AWQ pre-scaling is skipped.CLI and docs mirror the policy: optional imatrix for fixed maps, warnings on no-imatrix runs, and tests for legacy rejection vs allowed MXFP/NVFP paths.
mlx convertrejects--quantizeon foreign typespp-lcnet-orianduvdocbefore backend conversion.The GRPO optimizer round-trip test is rewritten to seed a deterministic AdamW SafeTensors fixture and exercise load → save → load → save on the model thread, replacing flaky GRPO training/retry logic.
Reviewed by Cursor Bugbot for commit ec4d953. Bugbot is set up for automated code reviews on this repo. Configure here.