返回全部动态

CodeRankEmbed-flash-attn:bf16量化与三层注意力调度

原标题:handwoven8588/CodeRankEmbed-flash-attn

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

AI 摘要

该模型仓库发布了 nomic-ai/CodeRankEmbed 的 bf16 量化版本,权重未重新训练,仅将原始权重转为 bf16。其核心改动是在自定义 modeling_hf_nomic_bert.py 中内置三层注意力调度:torch_varlen、flash_attn 和 eager,其中前两者用 O(N) 非填充路径替代原始 O(seq²) 注意力,以解决大 batch 下的显存溢出问题,并保持嵌入结果一致。模型默认以 bf16 加载,可通过环境变量或 revision 控制注意力实现与版本。

以上摘要由 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-28 05:32
抓取时间:2026-09-26 11:33
来源机构:Hugging Face
阅读原文huggingface.co