Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 13 min read How-to mediumAdept

Build a Domain-Specific Embedding Model in Under a Day

A single-GPU pipeline fine-tunes Llama-Nemotron-Embed-1B-v2 for a specific domain in under a day without manual labels. An LLM generates synthetic single- and multi-hop QA pairs from raw documents, which are quality-filtered. The base model then mines hard negatives, using a 95% margin ceiling to avoid false negatives. Training is a contrastive biencoder run at temperature 0.02, followed by BEIR evaluation, ONNX/TensorRT export and serving through NIM. On NVIDIA docs this gave about 10% gains in NDCG@10 and Recall@10, and Atlassian raised Jira Recall@60 from 0.751 to 0.951. The guide also covers practical defaults: 1–2 epochs for real data, LR 1e-5, and 1 positive plus 4 hard negatives per query.

Related posts

  • NVIDIA Releases 6 Million Multi-Lingual Reasoning Dataset

    Hugging Face mediumAdept

    Nemotron Post-Training Dataset V2 translates NVIDIA's English reasoning post-training data into French, Spanish, German, Italian and Japanese, translating prompts and responses while keeping the original English reasoning chains. LLM translation of long SFT data tends to hallucinate, so the pipeline translates line by line, skips code blocks, and forces outputs inside special brackets so malformed translations can be detected and discarded. Discard rates reach 26% for Spanish code data, and fastText language ID filtering removes another 1.1% of examples. Qwen2.5-32B-Instruct-AWQ (German) and Qwen2.5-14B-Instruct (other languages) did the translation, chosen for quality, single-A100 fit and Apache 2.0 licensing. The release ties in with Nemotron Nano 2 9B, a hybrid Transformer–Mamba model with a configurable thinking budget.

  • Welcome EmbeddingGemma, Google's new efficient embedding model

    Hugging Face mediumAdept

    EmbeddingGemma is Google's 308M-parameter multilingual text embedding model. It is built on a Gemma3 backbone modified to use bidirectional attention, with mean pooling and two dense layers producing 768-dimensional vectors. It supports a 2K-token context and over 100 languages, runs in under 200 MB of RAM when quantized, and ranks highest among text-only multilingual models under 500M parameters on MMTEB. Because it was trained with Matryoshka Representation Learning, embeddings can be truncated to 512, 256 or 128 dimensions, and inputs need task-specific prompts such as "task: search result | query: " to get correct results. Code examples cover Sentence Transformers, LangChain, LlamaIndex, Haystack, txtai, Transformers.js, TEI and ONNX, plus a finetuning walkthrough on the MIRIAD medical dataset whose resulting model outperforms models twice its size on that task.

  • Beating proprietary models with a quick fine-tune

    Modal mediumAdept

    Fine-tuning an open-source embedding model on a few hundred labeled pairs can beat OpenAI's text-embedding-3-small on duplicate-question detection, at lower cost. A grid search on the Quora duplicates dataset covered three base models (bge-base-en-v1.5, all-mpnet-base-v2, jina-embeddings-v2-small-en), dataset sizes from 100 to ~100k examples, and 256 vs 512 output dimensions, with each run on its own GPU in parallel via Modal's map. bge-base passed the baseline by 200 examples and kept improving, reaching about 13% error versus 17%. mpnet plateaued early, jina never beat the baseline, and the larger dimension gave no accuracy gain, so 256 dimensions is the cheaper choice.

  • The Open Evaluation Standard: Benchmarking NVIDIA Nemotron 3 Nano with NeMo Evaluator

    Hugging Face mediumAdept

    NVIDIA published the complete NeMo Evaluator recipe behind the Nemotron 3 Nano 30B A3B model card, covering YAML configs, prompts, runtime settings and structured logs, so anyone can rerun and audit the reported benchmark scores. NeMo Evaluator is an orchestration layer over existing harnesses such as NeMo Skills and LM Evaluation Harness, and it decouples evaluation from the inference backend. The walkthrough installs the launcher, points it at the build.nvidia.com endpoint or a local server, and runs the full suite or individual tasks (MMLU-Pro 78.3, AIME 2025 89.1, GPQA 73.0, and others) with a single CLI command. Small run-to-run score variance is expected, and the goal is methodological consistency rather than identical outputs.

  • Mistral 7B and BAAI on Workers AI vs. OpenAI Models for RAG

    Neon mediumAdept

    Swapping gpt-3.5-turbo for mistral-7b-instruct-v0.1 and text-embedding-ada-002 for BAAI's bge-base-en-v1.5 (both on Cloudflare Workers AI) in Neon's docs chatbot shows embeddings are close to interchangeable but text generation is not. Across eight Postgres questions, the two embedding models returned the same retrieved chunks 46% of the time at k=3 (42% at k=10), with Jaccard and TF-IDF cosine scores indicating substantial context overlap. Expert raters scored GPT-3.5 answers 3.8/5 versus 2.5/5 for Mistral 7B. Migrating embeddings to BGE looks viable and can cut vector storage, while replacing the generation model would noticeably hurt answer quality.

The quest for software engineering knowledge.

Look:
Layout: