Skip to content

BERT-like models with RoPE #42738

Closed

Description

@hmellor

Model description

Some BERT-like models:

  • NomicBert
  • GTE
  • Snowflake GTE
  • Jinaai embeddings

Are well used custom models which implement BERT with RoPE.

This is a tracking issue to add support for them in Transformers.


One motivation for this is so that the Transformers modeling backend for vLLM can run these models, allowing us to completely remove all embedding model implementations from vLLM.

Open source status

  • The model implementation is available
  • The model weights are available

Provide useful links for the implementation

No response

Activity

  1. vasqu commented on Dec 9, 2025

    @vasqu
    Collaborator

    Sorry missed this, commenting myself to also keep track for what to integrate

  2. ed22699 commented on Dec 27, 2025

    @ed22699
    Contributor

    Hi @hmellor, @Bumsparkle and I would love to take this on if it's still available

  3. reopened this on Apr 2, 2026
  4. vasqu commented on Apr 2, 2026

    @vasqu
    Collaborator

    Some updates

    • Jina v3 is done --> potentially next ones are v4, v5 are already handled natively
    • Nomic Bert (text-only models) are done --> multimodal ones + MoE could be done next
  5. harshaljanjani commented on Aug 29, 2026

    @harshaljanjani
    Contributor

    Working on GTE, Alibaba-NLP/gte-*-en-v1.5 and gte-multilingual-*, which should also cover snowflake-arctic-embed-m-v2.0 since it ships the same architecture, will raise the PR. #48407 is a fix I hit on the way.

  6. jayzuccarelli commented on Oct 6, 2026

    @jayzuccarelli
    Contributor

    @vasqu @ed22699 Following up on "multimodal ones + MoE could be done next": I'd like to take the MoE variant (nomic-ai/nomic-embed-text-v2-moe) unless someone is already on it.

    Its config declares model_type: nomic_bert with num_experts=8, moe_top_k=2 and moe_every_n_layers=2, none of which the native NomicBert supports today, so it still needs trust_remote_code.

    Plan, text-only:

    • MoE block (router + top-k experts) on every second layer in modular_nomic_bert.py, plus the new config fields
    • weight conversion from the megablocks expert layout
    • tiny-config tests, and logit parity against the remote-code model

    Two questions before I start:

    1. Should the experts reuse one of the existing MoE modules in the library (if so, which one would you point me to), or stay custom?
    2. Extend NomicBert under the same model_type, or add a separate nomic_bert_moe?
  7. ArthurZucker commented on Oct 20, 2026

    @ArthurZucker
    Collaborator

    Status update on this tracking list:

    To add it, follow the modular guide and the Transformers tenets.

  8. harshaljanjani commented on Oct 21, 2026

    @harshaljanjani
    Contributor

    Hi @ArthurZucker, the author of #48416 here, thanks for the update! #48416 also covered Snowflake GTE alongside Alibaba's checkpoints, as mentioned in its model doc on main and tested in the integration tests. Its checkpoint already declares model_type: "gte" as well, so AutoModel.from_pretrained("Snowflake/snowflake-arctic-embed-m-v2.0") should load the model without trust_remote_code

  9. vasqu commented on Oct 21, 2026

    @vasqu
    Collaborator

    I think we got all of the models listed here cc @hmellor fyi

  10. ArthurZucker commented on Oct 22, 2026

    @ArthurZucker
    Collaborator

    Let's close then ty all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions