Skip to content

fix(gallery): normalize inconsistent tag casing/plurals across gallery models#9574

Open
Anai-Guo wants to merge 1 commit intomudler:masterfrom
Anai-Guo:fix/gallery-tag-normalization
Open

fix(gallery): normalize inconsistent tag casing/plurals across gallery models#9574
Anai-Guo wants to merge 1 commit intomudler:masterfrom
Anai-Guo:fix/gallery-tag-normalization

Conversation

@Anai-Guo
Copy link
Copy Markdown
Contributor

Summary

Fixes #9247 — the gallery's Embedding filter only surfaces 5 models because well-known embedding models (nomic-embed-text-v1.5, granite-embedding-*, embeddinggemma-300m, all-MiniLM-L6-v2, bert-embeddings) are tagged with the plural embeddings while the WebUI filter looks for the singular embedding.

While auditing for the reporter's stated suspicion that "this may be happening with other tags", I also found case-inconsistent variants of cpu/gpu/tts/asr (e.g. GPU, Cpu, CPU, TTS, ASR) and three pre-existing duplicate-tag entries.

Changes (only gallery/index.yaml)

Bad tag Canonical Models affected
embeddings embedding 6
TTS tts 5
ASR asr 2
CPU, Cpu cpu 17
GPU gpu 17

The canonical form is the one already used by 600–800+ existing models AND, for embedding, the term hardcoded by the WebUI category filter:

https://github.com/mudler/LocalAI/blob/master/core/http/views/models.html#L…{ term: 'embedding', label: 'Embedding', icon: 'fas fa-vector-square' }

Bonus cleanup: deduplicated tag entries on 3 models that already had repeated tags before this PR (gpt-oss-20b had gguf listed twice, arcee-ai/AFM-4.5B had gpu listed twice, one Qwen variant had default listed twice).

Verification

$ python -c "import yaml,collections; \
   data = yaml.safe_load(open('gallery/index.yaml')); \
   c = collections.Counter(t for m in data for t in (m.get('tags') or [])); \
   print({k: c[k] for k in ['embedding','embeddings','cpu','CPU','Cpu','gpu','GPU','tts','TTS','asr','ASR']})"
{'embedding': 11, 'embeddings': 0, 'cpu': 806, 'CPU': 0, 'Cpu': 0, 'gpu': 681, 'GPU': 0, 'tts': 166, 'TTS': 0, 'asr': 9, 'ASR': 0}

All 969 model entries unchanged outside their tags lists. Repro for the original bug:

  1. Filter by Embedding in the gallery — was 5 models, now 11 (incl. nomic-embed-text-v1.5, granite-embedding-*, embeddinggemma-300m).

🤖 Generated with Claude Code

…y models

- embeddings → embedding (6 models): aligns with the WebUI filter button
  defined in core/http/views/models.html ({ term: 'embedding', ... }), so
  models like nomic-embed-text-v1.5 now appear under the Embedding filter
- TTS → tts (5 models), ASR → asr (2 models): lowercase, per existing
  convention used by 161+ models
- CPU/Cpu → cpu (17 models), GPU → gpu (17 models): lowercase, per existing
  convention used by 666+ models
- dedupe duplicate tag entries on 3 models that already had repeated tags
  (gpt-oss-20b had gguf x2; arcee-ai/AFM-4.5B had gpu x2; one Qwen model
  had default x2)

Closes mudler#9247
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.

Mismatched tags on gallery models

1 participant