Skip to content

Show model language scope on cards - #31

Merged
Samoed merged 5 commits into
embeddings-benchmark:mainfrom
GioiaZheng:model-language-scope-cards
Jul 5, 2026
Merged

Show model language scope on cards#31
Samoed merged 5 commits into
embeddings-benchmark:mainfrom
GioiaZheng:model-language-scope-cards

Conversation

@GioiaZheng

Copy link
Copy Markdown
Contributor

Summary

  • Add a compact language-scope badge to /models cards using the existing ModelMeta.languages field.
  • Show Monolingual · {language} for single-language models and Multilingual · {count} for multi-language models.
  • Preserve the full normalized language list through the native tooltip and aria label, while keeping long lists visually elided.
  • Cover empty, monolingual, multilingual, dedupe, and sorting behavior in unit tests.

Closes embeddings-benchmark/mteb#4827

Validation

  • npm ci with Node 24.14.0
  • npm run test:unit — 7 files / 89 tests passed
  • PUBLIC_API_URL=http://localhost:8000 npm run check — 0 errors / 0 warnings
  • npm run lint — passed; existing css/use-baseline warnings remain in upstream styles
  • git diff --check HEAD~1..HEAD

@KennethEnevoldsen KennethEnevoldsen 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.

Currently looks like this:

Image

but there is not info when clicking onto the model card, maybe we want to add that as well?

Besides that I think this change is reasonable

@KennethEnevoldsen
KennethEnevoldsen requested a review from Samoed June 29, 2026 07:49
@Samoed

Samoed commented Jun 29, 2026

Copy link
Copy Markdown
Member

I'm not sure about Monolingual badge. For me, it's a bit strange that we show Monolingual + language name, while for Multilingual we show lang count

@KennethEnevoldsen

Copy link
Copy Markdown
Contributor

We could change to simply, monolingual, multilingual and only give the extended info when clicking the model?

@GioiaZheng

Copy link
Copy Markdown
Contributor Author

Thanks, that makes sense. I pushed a small follow-up that keeps the card label to Monolingual / Multilingual and preserves the normalized language list in the tooltip and aria label. I left the model detail page unchanged for now to keep this PR focused on the card view.

@KennethEnevoldsen

Copy link
Copy Markdown
Contributor

Added the extended view here:

Screenshot 2026-07-05 at 15 07 26

@KennethEnevoldsen

Copy link
Copy Markdown
Contributor

@Samoed can you review?

@Samoed
Samoed enabled auto-merge (squash) July 5, 2026 18:30
@Samoed
Samoed merged commit fa8f85f into embeddings-benchmark:main Jul 5, 2026
7 checks passed
@GioiaZheng
GioiaZheng deleted the model-language-scope-cards branch July 9, 2026 12:41
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.

Add languages to model cards

3 participants