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

.
β”œβ”€β”€ 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.

Downloads last month
53
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support