Repository navigation
fix(studio): auto-enable --embedding for GGUFs missing pooling_type - #9149
Conversation
|
Confirmed this hits llama_cpp.py where is_embedding_gguf still keys only off pooling_type, so GGUFs that omit it never launch with --embedding. |
|
Codex Review: Didn't find any major issues. Swish! 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". |
Detect dedicated embedding architectures (nomic-bert, llama-embed, etc.) and embedding model identifiers when the GGUF header omits pooling_type, so llama-server launches with --embedding and /v1/embeddings works. Fixes unslothai#9128
0c45b4d to
db02519
Compare
|
ran a deterministic A/B with the related tests |
|
Re-checked at the current head and the fallback does cover the header-less GGUFs from the report, but "bert" in GGUF_EMBEDDING_ARCHITECTURES means a reranker is kept out only by a "rerank" substring in its name, which is the exact case the old refusal guarded. Could you gate the generic bert arch on something intrinsic rather than the name list? |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
|
reviewed and approved 131 tests green and the real GGUF A/B shows the fix passes and revert reproduces good to merge |
Summary
Fixes #9128
Studio only launched llama-server with
--embeddingwhen a GGUF header declared a sequence pooling type (MEAN/CLS/LAST). Many embedding models omit that field, so/v1/embeddingsreturned 501:{"error":{"code":501,"message":"This server does not support embeddings. Start it with `--embeddings`"}}This adds architecture/name-based detection as a fallback when
pooling_typeis absent, while still respecting explicit NONE/RANK header values.Changes
gguf_metadata.py: detect dedicated embedding architectures (nomic-bert,llama-embed, etc.) and embedding model name hintsllama_cpp.py: extendis_embedding_ggufto use the fallback probeinference.py: pass model identifier into the embedding GGUF probeTest plan
pytest tests/test_embedding_gguf_launch.py tests/test_gguf_metadata.py -k embedding(24 passed)--embeddingonnomic-embed-text-v1.5(CPU)--embedding(CPU)pooling_typenow classify as embedding models