Skip to content

Studio: do not show Run for embedding-only non-GGUF models in the Model Hub - #7245

Merged
danielhanchen merged 4 commits into
mainfrom
studio-hub-embedding-run-guard
Jul 20, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
studio-hub-embedding-run-guard

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Follow-up to #7001. That change gated the non-GGUF Run button on host capability and format support, which is correct for generative models. But a downloaded embedding-only repo (for example a sentence-transformers or feature-extraction model) reports canChat by safetensors format and classifies as supported, so the Model Hub still shows an enabled Run button that dead-ends when the loader tries to start a chat on a model with no generative head.

Fix

Treat an embedding-only non-GGUF model (has an embedding capability and none of conversational, tools, reasoning, code, vision or audio) as not runnable, and keep it out of the Run gate. GGUF is unaffected, since llama.cpp resolves embed vs generate at load time. This only touches the Run affordance; the model stays trainable, so the shared train gate is untouched.

Verification

The gating predicate was checked against embedding-only, chat, hybrid, GGUF and CPU-only cases; the enabled-Run set now matches what actually loads, and the previously dead-ending embedding-only case is disabled. Frontend only, scoped to the Model Hub card.

Compatibility

Additive guard on the existing predicate; no change to GGUF, chat or hybrid models, and the train gate is unaffected.

…el Hub

A downloaded embedding-only repo (sentence-transformers, feature-extraction)
reports canChat by safetensors format and classifies as supported, so the Model
Hub showed a Run button that dead-ends at load. Keep embedding-only non-GGUF
models out of the Run gate. GGUF is unaffected (llama.cpp resolves embed vs
generate at load time), and these models stay trainable.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a check to identify embedding-only, non-GGUF models to prevent them from being loaded in chat environments where they would fail due to the lack of a generative head. The reviewer suggests simplifying and future-proofing this check by verifying that all of the model's capabilities are either 'embedding' or 'multilingual', rather than maintaining an explicit list of non-generative capabilities.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +536 to +547
const isEmbeddingOnly =
!model.isGguf &&
model.capabilities.some((c) => c.key === "embedding") &&
!model.capabilities.some(
(c) =>
c.key === "conversational" ||
c.key === "tools" ||
c.key === "reasoning" ||
c.key === "code" ||
c.key === "vision" ||
c.key === "audio",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This check can be simplified and made more future-proof. Instead of maintaining an explicit list of all generative capabilities (which would need to be updated whenever a new capability is added), we can define an embedding-only model as one where all of its capabilities are either embedding or multilingual.

This reduces the complexity and avoids potential bugs if new generative capabilities are introduced in the future.

  const isEmbeddingOnly =
    !model.isGguf &&
    model.capabilities.some((c) => c.key === "embedding") &&
    model.capabilities.every((c) => c.key === "embedding" || c.key === "multilingual");

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4cc1abdb0e

ℹ️ 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".

Comment on lines +538 to +542
model.capabilities.some((c) => c.key === "embedding") &&
!model.capabilities.some(
(c) =>
c.key === "conversational" ||
c.key === "tools" ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exempt text-generation models from the embedding-only gate

When a runnable hybrid model advertises an embedding tag (for example feature-extraction) but has pipelineTag: "text-generation" and no chat/code/etc. tags, detectCapabilities produces only embedding: its conversational detection does not recognize text-generation. This predicate then disables Run despite the model meeting the prior runtime/support checks. Treat a generative pipeline tag as a positive exception (or derive this from architecture metadata) so those hybrid repositories remain runnable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exempting every text-generation pipeline would re-enable Run for the causal-LM rerankers and embedders this gate is meant to catch (Qwen3-Reranker, e5-mistral, gte-Qwen are all text-generation). The embedding heuristic keys on embed/reranker/e5/gte/bge model ids, which no mainstream instruct chat model matches, so runnable chat models are not affected. Keeping the gate as is.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4cc1abdb0e

ℹ️ 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".

Comment on lines +541 to +546
c.key === "conversational" ||
c.key === "tools" ||
c.key === "reasoning" ||
c.key === "code" ||
c.key === "vision" ||
c.key === "audio",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep code embedding models out of the Run gate

For embedding-only repositories whose name or tags also identify them as code models, this exception re-enables the dead-ending Run action. For example, jinaai/jina-embeddings-v2-base-code receives both embedding and code from detectCapabilities (the latter from the code suffix), so isEmbeddingOnly becomes false even though it has no generative head. The same issue applies to embedding models classified as reasoning, vision, or audio; use an actual generative pipeline/capability signal rather than these topical labels to exempt a model.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. jina-embeddings-v2-base-code picks up the code label from its name suffix, so I now gate on the embedding pipeline tag, which is authoritative and keeps these code and vision embedding repos out of the Run action.

An embedding repo whose name or tags also imply code, vision, audio or
reasoning (e.g. jina-embeddings-v2-base-code picks up code from its
-code suffix) slipped the embedding-only Run gate and dead-ended on a
chat load. Treat a feature-extraction or sentence-similarity pipeline
tag as authoritative for the gate; the change only ever widens it.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 36a4da563c

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 36a4da563c

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f96119d9b3

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member Author

Before and after for hiding Run on embedding-only non-GGUF models in the Model Hub, using a real feature-extraction repo (no mocks).

model hub run gating before and after

Before, an embedding-only safetensors model showed an enabled Run button that dead-ends when the loader tries to start a chat. After, it is treated as not runnable and Run is disabled; GGUF and the train gate are unaffected.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: b96f406609

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 6c78147 into main Jul 20, 2026
41 checks passed
@danielhanchen
danielhanchen deleted the studio-hub-embedding-run-guard branch July 20, 2026 12:28
VectorCipher pushed a commit to VectorCipher/unsloth that referenced this pull request Jul 20, 2026
…el Hub (unslothai#7245)

* Studio: do not show Run for embedding-only non-GGUF models in the Model Hub

A downloaded embedding-only repo (sentence-transformers, feature-extraction)
reports canChat by safetensors format and classifies as supported, so the Model
Hub showed a Run button that dead-ends at load. Keep embedding-only non-GGUF
models out of the Run gate. GGUF is unaffected (llama.cpp resolves embed vs
generate at load time), and these models stay trainable.

* Gate embedding-only models on the pipeline tag, not just capabilities

An embedding repo whose name or tags also imply code, vision, audio or
reasoning (e.g. jina-embeddings-v2-base-code picks up code from its
-code suffix) slipped the embedding-only Run gate and dead-ended on a
chat load. Treat a feature-extraction or sentence-similarity pipeline
tag as authoritative for the gate; the change only ever widens it.

* studio: tighten comments in the hub embedding run guard

* Tighten comments in the hub embedding run guard

---------

Co-authored-by: danielhanchen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant