Repository navigation
Studio: point compressed-tensors, AWQ and GPTQ models to the vLLM engine - #13043
Conversation
The Default engine cannot load compressed-tensors checkpoints such as unsloth/Qwen3.8-27B-NVFP4, but the optional vLLM engine can. On a host that can run vLLM: - The Default-engine refusal now says to set Inference engine to vLLM in the model's run settings. Hosts without vLLM support keep the same text. - The model hub no longer labels compressed-tensors, AWQ and GPTQ repos "May not be supported"; the model page shows "Requires vLLM" instead. Status stays unsupported, so chat pickers, training and engine selection behave as before. Fixes #11728.
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. |
A repo the hub rejects for another reason (an image or video task, a library such as diffusers, an EXL2 or ONNX format) keeps exactly the answer it had before; vLLM only excuses the quantization itself.
- Keep re-asking /api/engines for about two minutes while the backend's first GPU probe runs (it can take up to a minute), and keep the last answer when a read fails instead of dropping to false. - AWQ / GPTQ found by tag or name only gets the vLLM label when no other format objection applies (so tag order no longer decides it) and never for a GGUF repo. - The Requires vLLM tooltip names the real path: download, open it from the chat model picker, choose vLLM in its run settings.
The engine status was read once per session. Read it again whenever the hub mounts its first subscriber, and drop a read that finishes after a newer one.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8b9d204c6
ℹ️ 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".
| } | ||
|
|
||
| const VLLM_QUANT_METHODS: ReadonlySet<string> = new Set([ | ||
| "compressed-tensors", |
There was a problem hiding this comment.
Check the compression scheme before promising vLLM
On a host where the generic vLLM check passes, this treats every compressed-tensors checkpoint as runnable, but that quantization method is a container for schemes with different hardware requirements: for example, W8A8-FP8 requires compute capability 8.9 and W4A4 NVFP4 requires 10.0 in the official scheme matrix, while Studio declares vLLM host-supported starting at 8.0. Consequently, an A100 host will hide the unsupported warning for such models and the analogous backend hint will direct the user to vLLM, only for the model load to fail. Parse the checkpoint's compression scheme and compare its requirement with the selected GPU before setting supportedIn or emitting the hint.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not reproducible with the vLLM versions Studio installs (0.26.0 and 0.30.0): CompressedTensorsW4A4Fp4 (NVFP4) has get_min_capability 75, and W8A8 FP8 below 8.9 is served by CompressedTensorsW8A16Fp8 (min 75) in compressed_tensors.py, so NVFP4 and FP8 compressed-tensors load on compute capability 8.0 and up, which is the floor Studio already checks. Only W4A8-FP8 (min 90) needs more, and that scheme is rare enough to leave to vLLM's own load error.
Studio's vLLM engine refuses audio models, so a quantized speech recognition or TTS repo keeps its old label.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a9e8dbe26
ℹ️ 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".
| const library = libraryName?.toLowerCase().trim() || null; | ||
| const formatTags = excludedFormatTagsForDevice(deviceType); | ||
| const normalizedQuant = normalizeQuantMethod(quantMethod); | ||
| const vllmRuns = vllmAvailable && !(pipeline && AUDIO_TASK.test(pipeline)); |
There was a problem hiding this comment.
Exclude LoRA adapters from vLLM relabeling
When a LoRA/QLoRA repository name contains an AWQ or GPTQ base marker (for example, owner/base-AWQ-LoRA), this gate permits the later format check to return supportedIn: "vllm" without considering the adapter kind. Studio's managed-engine path unconditionally rejects config.is_lora in _reject_unsupported_managed_kind (studio/backend/routes/inference.py:17890-17902), so the Hub hides the unsupported warning and recommends an engine that always returns 400 for that selection. Include adapter metadata/tags in the vLLM-specific gate before applying this relabeling.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Adapter repos carry no quantization_config, so this needs an adapter whose repo name happens to contain AWQ or GPTQ; picking vLLM there returns Studio's explicit LoRA refusal. Leaving that naming corner as is.
| const vllm = engines.find((engine) => engine.engine === "vllm"); | ||
| return vllm !== undefined && vllm.unsupported_reason === null; |
There was a problem hiding this comment.
Require a usable engine for non-owner vLLM labels
For a non-owner on a capable host where vLLM is uninstalled, outdated, or currently being installed, this returns true solely because unsupported_reason is null, even though isEngineReady is false and the install/update controls are disabled for non-owners (inference-engines.tsx:90-138). The Hub therefore removes the unsupported warning and instructs that user to choose vLLM, but they cannot make the engine usable. Account ownership needs to be considered, or non-owners should receive the label only when vLLM is already ready.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The chip says the model requires vLLM, which stays true for a non-owner; choosing vLLM in run settings then shows them Ask the Studio owner to install this engine, which is the right next step. The label does not claim the engine is ready.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c611bc94df
ℹ️ 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".
| const library = libraryName?.toLowerCase().trim() || null; | ||
| const formatTags = excludedFormatTagsForDevice(deviceType); | ||
| const normalizedQuant = normalizeQuantMethod(quantMethod); | ||
| const vllmRuns = vllmAvailable && !(pipeline && AUDIO_TASK.test(pipeline)); |
There was a problem hiding this comment.
Use detected audio type when suppressing the vLLM label
The audio follow-up only checks pipelineTag, but cached/local inventory models independently carry audioType and may have a null or generic pipeline tag. For an AWQ/GPTQ/compressed-tensors TTS checkpoint in that state, this sets supportedIn: "vllm", hides the unsupported warning, and shows “Requires vLLM,” while _reject_unsupported_managed_kind rejects the same checkpoint from its detected config.is_audio with a 400. The fresh evidence after the prior fix is that the new gate never consumes the audioType already exposed by inventory, so it should also exclude detected non-audio_vlm audio models.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Needs a quantized speech checkpoint sitting in the local cache with no pipeline tag; Hub repos carry the task tag the gate reads, and picking vLLM for such a cached model still returns Studio's explicit audio refusal. Leaving that corner.
| /** The backend says this host can run vLLM, installed or not. */ | ||
| export function vllmHostSupported(engines: readonly EngineStatus[]): boolean { | ||
| const vllm = engines.find((engine) => engine.engine === "vllm"); | ||
| return vllm !== undefined && vllm.unsupported_reason === null; |
There was a problem hiding this comment.
Respect GPU visibility before advertising vLLM
On a host where CUDA_VISIBLE_DEVICES is empty or exposes only unsupported GPUs while another physical NVIDIA GPU meets the requirement, /api/engines still reports unsupported_reason: null: engine_install.status calls support_reason without a GPU id, so it accepts any physical nvidia-smi row. This function consequently enables the vLLM relabeling even though managed_engine.validate_load resolves the parent-visible GPU set and either reports that no GPU can be assigned or rejects every visible GPU. Base availability on a GPU Studio can actually assign, otherwise the Hub hides the accurate unsupported warning and recommends an unusable engine.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The label deliberately follows the same /api/engines answer the run-settings engine picker already uses, so the hub and the picker agree. A host whose visible GPUs are masked away from the qualifying card gets validate_load's explicit GPU refusal when it picks vLLM. Not changing the engine status semantics in this PR.
Replace the audio exclusion with an allow list: untagged repos, text-generation and image-text-to-text. Embedding, classification and audio checkpoints keep their old label.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c2a6a7147
ℹ️ 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".
| return _NVFP4_INFERENCE_UNSUPPORTED_MESSAGE | ||
| if _is_missing_compressed_tensors_error(msg): | ||
| return _COMPRESSED_TENSORS_INFERENCE_UNSUPPORTED_MESSAGE | ||
| return _COMPRESSED_TENSORS_INFERENCE_UNSUPPORTED_MESSAGE + _vllm_engine_hint(engine) |
There was a problem hiding this comment.
Gate the backend vLLM hint on the model kind
When a compressed-tensors TTS/audio checkpoint fails on the Default engine with one of these matched import errors, this unconditionally appends the vLLM instruction on every vLLM-capable host. Following that instruction cannot work because _reject_unsupported_managed_kind rejects every config.is_audio checkpoint before managed-engine loading. The frontend task allow-list does not cover this independent backend error path, so the hint should be suppressed when the failed model is a kind the managed engine refuses.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This refusal is raised while transformers builds the config (ModelConfig.from_identifier), before Studio knows whether the checkpoint is audio, so there is no model kind to gate on at that point. Compressed-tensors speech checkpoints are rare, and choosing vLLM for one returns Studio's explicit audio refusal. Leaving it.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c2a6a7147
ℹ️ 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".
| /** The backend says this host can run vLLM, installed or not. */ | ||
| export function vllmHostSupported(engines: readonly EngineStatus[]): boolean { | ||
| const vllm = engines.find((engine) => engine.engine === "vllm"); | ||
| return vllm !== undefined && vllm.unsupported_reason === null; |
There was a problem hiding this comment.
Keep vLLM models selectable on chat-only hosts
On a host with a supported NVIDIA GPU/driver but no usable Studio PyTorch installation, /api/engines can report vLLM as supported while the platform is in chat-only mode, so this enables the “Requires vLLM” label. However, the chat picker unconditionally removes every cached non-GGUF model in that mode (pickers.tsx:4705-4707), and the Hub's own Run action is also disabled for unsupported models, leaving no way to follow the tooltip's instruction to select vLLM after downloading an AWQ/GPTQ/compressed-tensors checkpoint. Either keep these vLLM-capable cached models visible in the picker or suppress the relabeling when the only advertised workflow is unreachable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Chat-only mode on an NVIDIA host means Studio was installed GGUF-only (no PyTorch) or its PyTorch is broken; that is a rare, explicit setup, and the label stays accurate (the model does need vLLM). Not adding a separate path for it here.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c2a6a7147
ℹ️ 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".
| const VLLM_FORMAT_KEYS: ReadonlySet<string> = new Set(["awq", "gptq"]); | ||
| // Chat tasks only: Studio's vLLM engine refuses audio (_reject_unsupported_managed_kind) and | ||
| // embeddings are not served through it. Untagged repos (unsloth/Qwen3.8-27B-NVFP4) are chat. | ||
| const VLLM_CHAT_TASKS: ReadonlySet<string> = new Set(["text-generation", "image-text-to-text"]); |
There was a problem hiding this comment.
Admit the other vision pipeline tags to vLLM
For quantized vision repositories whose Hugging Face task is image-to-text or visual-question-answering, this allow-list makes vllmRuns false, so AWQ/GPTQ/compressed-tensors models remain labeled “May not be supported” even on a vLLM-capable host. Both tasks are recognized as authoritative vision tasks elsewhere (features/model-picker/components/model-selector/model-capabilities.ts:17-26), and the managed engine explicitly supports vision checkpoints (studio/backend/routes/inference.py:17890-17901), so these pure vision tasks should receive the same supportedIn: "vllm" treatment as image-text-to-text.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The allow list is deliberately conservative: a repo outside it keeps exactly the label it has on main today, so nothing regresses. Widening it to image-to-text and visual-question-answering can come separately once those are checked against the managed engine.
Fixes #11728.
unsloth/Qwen3.8-27B-NVFP4is a compressed-tensors checkpoint (NVFP4 MLP weights, FP8 attention andlm_head). Studio's Default engine cannot load it, but the optional vLLM engine added in #11491 (Windows via WSL2 in #12024 and #12750) loads and runs it. I checked this end to end on a B200 with Studio main: Run settings > Inference engine > vLLM > Install and load, then chat answers correctly.The problem is that Studio never tells the user this:
Changes
Both changes only apply where the backend's own
support_reason("vllm")says this machine can run vLLM (installed or not). Everywhere else (Mac, CPU, AMD, older NVIDIA, a pending GPU probe, or any failure reading engine status) the text and labels are exactly as before.Backend (
studio/backend/routes/inference.py)support_reason(..., wait = False)never probes the GPU inline, so the error path does not block.Frontend
classifyUnslothSupporttakes an optionalvllmAvailable(defaultfalse, so every existing caller is unchanged). When set, compressed-tensors, AWQ and GPTQ (byquant_method, tag or repo name) returnsupportedIn: "vllm"for chat repos only (text-generation,image-text-to-text, or no pipeline tag), since Studio's vLLM path refuses audio, embedding and other non-chat models.statusstays"unsupported", so the chat picker, the training picker and training validation behave exactly as before. Task, library and other format rejections (Images/Video pipelines, EXL2, MLX, ONNX, ...) still win.useVllmAvailable(): one shared/api/enginesread for the whole hub (not a poller per row), re-read each time the hub opens and onstudio-engines-changed, and re-asked for about two minutes while the backend's first GPU probe is pending or a read fails (the last answer is kept on failure).supportedInis set. The model page shows a "Requires vLLM" chip (in place of the red label and the "GGUF only" chip) whose tooltip gives the path: download, open it from the chat model picker, choose vLLM as the Inference engine in its run settings.Not changed: no automatic engine switching, no install prompts, no change to which models the chat picker lists, and no change to training.
Testing
studio/backend/tests/test_compressed_tensors_load_error_message.py: 45 passed, including new cases for a vLLM-capable host (load and validate, Hub and native), a pending probe, an unsupported host, a failing check, and a request that already chose vLLM or SGLang. The new cases fail on main. The suite now pins the host to "no vLLM", so it no longer depends on the test machine's GPU.studio/frontend/tests/unsloth-support-vllm.test.tsplus the existing support, training-support and engine-readiness suites: all pass. WithvllmAvailableomitted the classifier output is identical to main.npm test): 11021 passed, 0 failed.tsc -bpasses; eslint reports no new problems on the touched files.supportedIn: "vllm"with the same reason. A repo rejected for anything else (image, video, audio or embedding task, diffusers, EXL2, ONNX, MLX, a GGUF repo named AWQ) keeps exactly its old answer, whatever order its tags come in.8e2ab33) vs this branch, frontend rebuilt for each side:Model page for
unsloth/Qwen3.8-27B-NVFP4: the red "May not be supported" label (and the red dot on the result row) becomes "Requires vLLM".Same for an AWQ repo,
Qwen/Qwen2.5-7B-Instruct-AWQ:Control: a plain safetensors checkpoint and the GGUF repo look identical on both sides:
Loading
unsloth/Qwen3.8-27B-NVFP4on the Default engine:Choosing vLLM in the run settings then loads the model and answers correctly (checked before this change; this PR does not touch the vLLM load path).