CoolFace
Modelpublic

DannePanne/coderank-transformersjs

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes8downloads
Model Card

CodeRankEmbed Transformers.js ONNX

This repository contains a Transformers.js-compatible ONNX export of nomic-ai/CodeRankEmbed for Cortex embedding experiments.

Runtime contract

  • Task: feature-extraction
  • Pooling: cls
  • Normalize: true
  • Dimensions: 768
  • Cortex model id: use this repository id as CORTEX_EMBED_MODEL
  • Query embedding text must use the CodeRankEmbed instruction prefix: Represent this query for searching relevant code: <query>

CodeRankEmbed must use CLS pooling. Mean pooling produced materially different vectors in local validation. Code/passages should be embedded unchanged; the instruction prefix is for search queries only.

Expected layout

text
.
├── config.json
├── tokenizer.json
├── tokenizer_config.json
├── special_tokens_map.json
└── onnx/
    └── model.onnx

The ONNX model is saved as a single file so Transformers.js can fetch it from the Hub without requiring a separate external data sidecar.