Construct orcarouter Flash-Next Uncensored-MLX via qwen4_exp shim - #1
Open
okwithit9-debug wants to merge 5 commits into
Open
okwithit9-debug wants to merge 5 commits into
okwithit9-debug wants to merge 5 commits into
Conversation
Recognize official Qwen3.8-27B MLX packs (same Qwen3_5 architecture as 3.5/3.6) as first-class cards, allowlist Qwen4Exp* for Flash-Next, and forward trust_remote_code / get_model_classes into mlx_lm with a documented blocker until mlx-lm#1788 vendors qwen4_exp. Co-authored-by: okwithit9-debug <okwithit9-debug@users.noreply.github.com>
Inject get_classes/load_model callables so registration and hook tests stay offline, and tighten types for basedpyright. Co-authored-by: okwithit9-debug <okwithit9-debug@users.noreply.github.com>
Co-authored-by: okwithit9-debug <okwithit9-debug@users.noreply.github.com>
okwithit9-debug
marked this pull request as ready for review
September 15, 2026 08:52
Drop the mlx-community Flash-Next card so EXO does not promote alternate forks. Keep the qwen4_exp load path and point docs at the NVFP4 Spark vLLM companion without adding it as an MLX card. Co-authored-by: okwithit9-debug <okwithit9-debug@users.noreply.github.com>
Stock mlx_lm still lacks qwen4_exp (ml-explore/mlx-lm#1788). Route load_mlx_lm_model through a temporary mlx-vlm>=0.6.17 adapter so the orcarouter Uncensored-MLX pack can be constructed, and document how to remove the shim when native mlx_lm classes ship. Co-authored-by: okwithit9-debug <okwithit9-debug@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The required Flash-Next line is orcarouter only:
orcarouter/Qwen3.8-Flash-Next-Uncensored-MLXorcarouter/Qwen3.8-Flash-Next-Uncensored-NVFP4Do not promote mlx-community generic Flash-Next, lychee888, or other quants as the default. Uncensored is a weight pack (abliteration), not a new training pipeline. EXO needs a working
qwen4_exp/Qwen4Exp*construct path so orcarouter Uncensored-MLX can load without waiting solely on mlx-lm#1788.Changes
orcarouter/Qwen3.8-Flash-Next-Uncensored-MLXonly (repo-root 4-bit MLX). No mlx-community Flash-Next card. No NVFP4 EXO MLX card.Qwen4ExpForConditionalGeneration/Qwen4ExpForCausalLM.src/exo/worker/engines/mlx/vendor/qwen4_exp.py+qwen4_exp_shim.py) soload_mlx_lm_modelcan construct the pack:mlx_lm.models.qwen4_expif present (after mDNS peer discovery broken when running from git source (uv sync + uv run) exo-explore/exo#1788).mlx_vlm.models.qwen4_exp(LanguageModel+ VLMsanitize, logitsmx.arrayfor EXO generate).Qwen4ExpUnavailableErrorwith install + “remove when mDNS peer discovery broken when running from git source (uv sync + uv run) exo-explore/exo#1788 lands” steps.qwen3_5path).Why It Works
orcarouter Uncensored-MLX is an mlx-vlm conversion (
Qwen4ExpForConditionalGeneration/qwen4_exp) with nomodel_file. The EXO pin of mlx_lm already acceptsget_model_classes; the shim suppliesModel/ModelArgsthat matchload_model(from_dict→ construct →sanitize→load_weights). Native mlx_lm wins when exo-explore#1788 ships; the vendor module is marked for deletion then.Honest remaining gap: this unblocks construct/load, not a verified full MoE / hybrid GDN+QSA / PLE n-gram generate pass, and not typed Mac+Spark
auto_parallelTP/PP. Those still need Apple-silicon (or CUDA MLX) runtime, the gated ~163 GiB pack, and Qwen4Exp layer handlers.Test Plan
Manual Testing
pip install 'mlx-vlm>=0.6.17', accept the HuggingFace gate, set a Hub token, download on Mac, launchorcarouter/Qwen3.8-Flash-Next-Uncensored-MLX./modelsshows that id (not mlx-community Flash-Next). NVFP4 is Spark vLLM only.Automated Testing
qwen3_5still registers.