Model overview
A **bf16 quantization of `nomic-ai/CodeRankEmbed`** with a custom `modeling_hf_nomic_bert.py`, shipped in this repo, that **picks one of three attention implementations for the hardware it runs on.** It is not a finetune — the weights are the original CodeRankEmbed weights cast to bf16 (no further training). Two of the three replace the original's padded `O(seq²)` attention with an `O(N)` unpadded path; the third keeps the original's algorithm as the correctness reference and universal fallback. `nomic-ai/CodeRankEmbed` loads through `trust_remote_code`, and its attention path is **eager only** — activation memory grows as `batch × heads × seq²`, which runs out of memory at large batches even though the model is only 137M params. This repo adds two attention paths that compute the same attention in `O(N)` memory by packing unpadded sequences, so the large batches that the eager path cannot fit run comfortably — with **parity embeddings** (no quality change): - `torch_varlen` — `torch.nn.attention.varlen.varlen_attn`, shipped in torch itself (no extra package), available from torch **2.10.0** onward. - `flash_attn` — the `flash_attn` package's varlen kernel. Kept as a fallback for older torch builds that don't yet have `torch.nn.attention.varlen` but do have `flash_attn` installed. This package is **optional**.
Key features
特点摘要待依据来源补齐,不凭模型名称推断能力。
Limitations & considerations
Sources are insufficient to establish specific limitations. Verify task performance, latency, data policies, licensing and version lifecycle.
Source prices & cost analysis
Prices vary by channel, region and configuration. Channel quotes are listed independently and are not treated as a single official provider price.
| Source / channel | Input | Output | Billing unit | Collected at |
|---|---|---|---|---|
| No verified prices yet. Check the source channel. | ||||
Estimate monthly base token costs
Estimates exclude cache discounts, tiered pricing, multimodal surcharges, web search, taxes and additional reasoning output.
Public benchmarks & run configuration
暂无已采集的可核验公开评分。模型未上榜不代表能力较低。
View full indexed rankings →Frequently asked questions
Do open weights permit free commercial use?
Not necessarily. Check the version license, commercial conditions and usage policies. Self-hosting incurs compute and maintenance costs.
Are these real-time billing prices?
These are timestamped source snapshots, not live billing prices. Check the channel for current versions, regions, discounts and billing methods.
Sources & traceability
许可证:mit。模型介绍与第三方评测均以原来源的具体版本和方法为准。