Index of every page on this site: llms.txt
All skills
davila7 avatar

/rag-sentence-transformers

@c1bc5c1
Run it yourself

Framework for state-of-the-art sentence, text, and image embeddings. Provides 5000+ pre-trained models for semantic similarity, clustering, and retrieval. Supports multilingual, domain-specific, and multimodal models. Use for generating embeddings for RAG, semantic search, or similarity tasks. Best for production embedding generation.

  • 2 files
  • 9.1 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/rag-sentence-transformers

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesmodels.md

≈732 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Sentence Transformers Models Guide

Guide to selecting and using sentence-transformers models.

Top recommended models

General purpose

all-MiniLM-L6-v2 (Default recommendation)

  • Dimensions: 384
  • Speed: ~2000 sentences/sec
  • Quality: Good
  • Use: Prototyping, general tasks

all-mpnet-base-v2 (Best quality)

  • Dimensions: 768
  • Speed: ~600 sentences/sec
  • Quality: Better
  • Use: Production RAG

all-roberta-large-v1 (Highest quality)

  • Dimensions: 1024
  • Speed: ~300 sentences/sec
  • Quality: Best
  • Use: When accuracy critical

Multilingual (50+ languages)

paraphrase-multilingual-MiniLM-L12-v2

  • Languages: 50+
  • Dimensions: 384
  • Speed: Fast
  • Use: Multilingual semantic search

paraphrase-multilingual-mpnet-base-v2

  • Languages: 50+
  • Dimensions: 768
  • Speed: Medium
  • Use: Better multilingual quality

LaBSE (109 languages)

  • Languages: 109
  • Dimensions: 768
  • Speed: Medium
  • Use: Maximum language coverage

Domain-specific

allenai/specter (Scientific papers)

  • Domain: Academic papers
  • Use: Paper similarity, citations

nlpaueb/legal-bert-base-uncased (Legal)

  • Domain: Legal documents
  • Use: Legal document analysis

microsoft/codebert-base (Code)

  • Domain: Source code
  • Use: Code similarity, search

Model selection matrix

Task Model Dimensions Speed Quality
Quick prototyping MiniLM-L6 384 Fast Good
Production RAG mpnet-base 768 Medium Better
Highest accuracy roberta-large 1024 Slow Best
Multilingual paraphrase-multi-mpnet 768 Medium Good
Scientific papers specter 768 Medium Domain
Legal docs legal-bert 768 Medium Domain

Performance benchmarks

Speed comparison (CPU)

Model Sentences/sec Memory
MiniLM-L6 2000 120 MB
MPNet-base 600 420 MB
RoBERTa-large 300 1.3 GB

Quality comparison (STS Benchmark)

Model Cosine Similarity Spearman
MiniLM-L6 82.4 -
MPNet-base 84.1 -
RoBERTa-large 85.4 -

Usage examples

Load and use model

from sentence_transformers import SentenceTransformer

# Load model
model = SentenceTransformer('all-mpnet-base-v2')

# Generate embeddings
sentences = ["This is a sentence", "This is another sentence"]
embeddings = model.encode(sentences)

Compare different models

models = {
    'MiniLM': 'all-MiniLM-L6-v2',
    'MPNet': 'all-mpnet-base-v2',
    'RoBERTa': 'all-roberta-large-v1'
}

for name, model_name in models.items():
    model = SentenceTransformer(model_name)
    embeddings = model.encode(["Test sentence"])
    print(f"{name}: {embeddings.shape}")

Resources

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at c1bc5c1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
Other metadata
metadata
{
  "version": "1.0.0",
  "author": "Orchestra Research",
  "tags": [
    "Sentence Transformers",
    "Embeddings",
    "Semantic Similarity",
    "RAG",
    "Multilingual",
    "Multimodal",
    "Pre-Trained Models",
    "Clustering",
    "Semantic Search",
    "Production"
  ],
  "dependencies": [
    "sentence-transformers",
    "transformers",
    "torch"
  ]
}

README badge

README badge for davila7/claude-code-templates/rag-sentence-transformers