返回全部动态

CodeRankEmbed 的 bf16 量化版内置三层注意力调度

原标题:handwoven8588/CodeRankEmbed-flash-attn

Hugging Face New and Trending Models一手来源开源质量 77

AI 摘要

Hugging Face 用户 handwoven8588 发布了 CodeRankEmbed-flash-attn,这是对 nomic-ai/CodeRankEmbed 的 bf16 量化版本,权重未重新训练。该仓库在自定义 modeling 文件中内置三层注意力调度(torch_varlen、flash_attn、eager),用 O(N) 非填充路径替代原有 O(seq²) 的 eager 注意力,以解决大 batch 下的显存溢出问题。实测显示 torch_varlen 与原始输出余弦相似度约 0.9999,峰值显存从约 1145 MiB 降至 875 MiB。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

--- base_model: nomic-ai/CodeRankEmbed base_model_relation: quantized library_name: sentence-transformers license: mit tags: - flash-attention - code-retrieval - sentence-transformers - nomic-bert - bf16 language: - en --- # CodeRankEmbed-flash-attn A **bf16 quantization of [`nomic-ai/CodeRankEmbed`](https://huggingface.co/nomic-ai/CodeRankEmbed)** with a **three-tier attention dispatch built into a custom `modeling_hf_nomic_bert.py` shipped in this repo.** It is not a finetune — the weights a


发布时间:2026-09-26 11:32
抓取时间:2026-09-26 11:33
来源机构:Hugging Face
阅读原文huggingface.co