potion code 16M v2 Model Card Overview potion code 16M v2 is a fast static code embedding model optimized for code retrieval tasks. It powers Semble, a code search library for agents. It is distilled from nomic ai/CodeRankEmbed and trained on the CornStack code corpus using Tokenlearn and contrastive fine tuning. It is the successor to potion code 16M. It uses static embeddings, allowing text and code embeddings to be computed orders of magnitude faster than transformer based models on both GPU and CPU. Installation Usage How it works potion code 16M v2 is created using the following pipeline: 1. Vocabulary mining : code specific tokens are mined from CornStack and added to the base CodeRankEmbed tokenizer (43k extra tokens → ~63.5k total) 2. Distillation : the extended vocabulary is distilled from CodeRankEmbed using Model2Vec (256 dimensional embeddings, PCA) 3. Tokenlearn : the distilled model is fine tuned on 1.2 million (query, document) pairs from CornStack using cosine similarity loss 4. Contrastive fine tuning : the model is further fine tuned using MultipleNegativesRankingLoss on 1.2 million CornStack query document pairs Results Results on the CoIR benchmark on MTEB (NDCG…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy