shobrook/weightgain
Train an adapter for any embedding model in under a minute
Trains a lightweight linear transformation layer on top of any embedding model—including closed-source APIs like OpenAI and Cohere—by optimizing query-chunk pair similarity without retraining the base model. Supports synthetic dataset generation via LLM when training data isn't available, and exposes the learned weight matrix for direct application to existing embeddings. Integrates with LiteLLM to support 50+ embedding providers and provides visualization tools to evaluate adapter performance.
129 stars. No commits in the last 6 months.
Stars
129
Forks
7
Language
Python
License
MIT
Category
Last pushed
Apr 09, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/embeddings/shobrook/weightgain"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
ContextualAI/gritlm
Generative Representational Instruction Tuning
xlang-ai/instructor-embedding
[ACL 2023] One Embedder, Any Task: Instruction-Finetuned Text Embeddings
liuqidong07/LLMEmb
[AAAI'25 Oral] The official implementation code of LLMEmb
hpcaitech/CachedEmbedding
A memory efficient DLRM training solution using ColossalAI
jina-ai/llm-query-expansion
Query Expension for Better Query Embedding using LLMs