Skip to content

[Docs] Add blog: training embedding models and publishing to Hugging Face - #2670

Draft
TwilightTechie wants to merge 2 commits into
vllm-project:mainfrom
TwilightTechie:blog/2667-training-embeddings-huggingface
Draft

[Docs] Add blog: training embedding models and publishing to Hugging Face#2670
TwilightTechie wants to merge 2 commits into
vllm-project:mainfrom
TwilightTechie:blog/2667-training-embeddings-huggingface

Conversation

@TwilightTechie

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it

Adds a blog post walking through how vLLM Semantic Router trains its embedding models and publishes them to Hugging Face:

  • Pipeline A — cache embedding LoRA: triplet generation, LoRA fine-tuning on MiniLM, margin evaluation, upload to the llm-semantic-router org, and consuming the adapter with PEFT
  • Pipeline B — domain-adapted full embeddings: data prep, iterative hard-negative mining with TripletLoss, measured MRR@5 gains, and full-model upload
  • How Hugging Face fits the publish/discover/pull/iterate loop and how the published models reconnect to routing and semantic cache similarity

Includes a hero image (1200x630) used for the blog card and social preview.

Which issue(s) this PR fixes

Fixes #2667

Test Plan

  • markdownlint -c tools/linter/markdown/markdownlint.yaml passes on the new post
  • Rendered locally with the Docusaurus dev server: title, authors (aayushsaini101, anupsharma from authors.yml), tags, tables, code blocks, and hero image all display correctly
  • <!-- truncate --> marker added so the blog index shows a short preview
  • All external links (GitHub paths, Hugging Face model/dataset repos, arXiv) resolve

@netlify

netlify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit c3ded49
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/6a69ea7cd27d140008aaaf2c
😎 Deploy Preview https://deploy-preview-2670--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…Face

Walkthrough of the cache-LoRA and domain-adapted embedding pipelines,
evaluation, and publishing to the llm-semantic-router Hugging Face org.

Fixes vllm-project#2667

Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned when their GitHub accounts are assignable in this repository:

📁 website

Owners: @FAUST-BENCHOU, @shraderdm, @drivebyer, @ramkrishs, @WUKUNTAI-0211, @AayushSaini101, @siloteemu
Files changed:

  • website/blog/2026-07-25-training-embedding-models-huggingface.md
  • website/static/img/blog/training-embeddings-hf-hero.png

vLLM Semantic Router

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@AayushSaini101
AayushSaini101 marked this pull request as draft July 25, 2026 06:28

@drivebyer drivebyer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for putting this together — the walkthrough of both pipelines is genuinely useful, and I checked the CLI flags, hyperparameters, margin formula, triplet field semantics, and the +71% MRR@5 figure against the code and READMEs: they all match.

Two factual issues worth fixing before merge, both flagged inline: three of the Hugging Face links don't resolve, and the cited arXiv paper title doesn't match the actual paper.

Comment on lines +141 to +143
- [multi-domain-cache-lora-L12](https://huggingface.co/llm-semantic-router/multi-domain-cache-lora-L12)
- [medical-cache-lora](https://huggingface.co/llm-semantic-router/medical-cache-lora)
- Dataset: [cache-embedding-test-sets](https://huggingface.co/datasets/llm-semantic-router/cache-embedding-test-sets)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All three links return 401, and none of them appear in the org's public listing (58 models / 13 datasets) — same for law-cache-lora and programming-cache-lora. Either re-publish the repos or drop the links. The mmbert-embed-* links in Pipeline B resolve fine.

not only cache LoRA.

Inspired by
[Distilling an LLM’s Wisdom…](https://arxiv.org/abs/2512.08088).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

arXiv:2512.08088 is actually titled "Adaptation of Embedding Models to Financial Filings via LLM Distillation" (v1 only, never renamed). No paper by the cited name exists. Same typo in domain_adapted_embeddings/README.md:7 — worth fixing both.

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 Blog: Training embedding models and publishing them to Hugging Face

7 participants