Skip to content

Add all available ONNX models to ORTConfigManager #351

Description

@chainyo

This issue is linked to the ONNXConfig for all working group created for implementing an ONNXConfig for all available models. Let's extend our work and try to add all models with a fully functional ONNXConfig implemented to ORTConfigManager.

Adding models to ORTConfigManager will allow 🤗 Optimum users to boost even more their model with ONNX optimization capacity!

Feel free to join us in this adventure! Join the org by clicking here

Here is a non-exhaustive list of models that have one ONNXConfig and could be added to ORTConfigManager:

This includes only models with ONNXConfig implemented, if your target model doesn't have an ONNXConfig, please open an issue/or implement it (even cooler) in the 🤗 Transformers repository. Check this issue to know how to do

  • Albert
  • BART
  • BeiT
  • BERT
  • BigBird
  • BigBirdPegasus
  • Blenderbot
  • BlenderbotSmall
  • BLOOM
  • CamemBERT
  • CLIP
  • CodeGen
  • ConvNext
  • ConvBert
  • Data2VecText
  • Data2VecVision
  • Deberta
  • Deberta-v2
  • DeiT
  • DETR
  • Distilbert
  • ELECTRA
  • Flaubert
  • GptBigCode
  • GPT2
  • GPTJ
  • GPT-NEO
  • GPT-NEOX
  • I-BERT
  • LayoutLM
  • LayoutLMv2
  • LayoutLMv3
  • LeViT
  • Llama
  • LongT5
  • M2M100
  • mBART
  • MT5
  • MarianMT
  • MobileBert
  • MobileViT
  • nystromformer
  • OpenAIGPT-2
  • PLBart
  • Pegasus
  • Perceiver
  • ResNet
  • RoFormer
  • RoBERTa
  • SqueezeBERT
  • T5
  • ViT
  • Whisper
  • XLM
  • XLM-RoBERTa
  • XLM-RoBERTa-XL
  • YOLOS

If you want an example of implementation, I did one for MT5 #341.

You need to check how the attention_heads number and hidden_size arguments are named in the original implementation of your target model in the 🤗 Transformers source code. And then add it to the _conf dictionary. Finally, add your implemented model to tests to make it fully functional.

Activity

  1. mszsorondo commented on Aug 11, 2023

    @mszsorondo
    Contributor

    To update the list of supported models: BlenderBot, BLOOM, GptBigCode, GPT-NEOX, GPTJ, LongT5, Llama, mBART, M2M100, nystromformer, Pegasus,T5 ,ViT ,Whisper
    @michaelbenayoun @fxmarty is there still interest in advancing with other models?

  2. chainyo commented on Aug 11, 2023

    @chainyo
    ContributorAuthor

    Thanks @mszsorondo I just updated the list based on your comment 🙏 .

  3. Rahuldrabit commented on Nov 19, 2025

    @Rahuldrabit

    can i try to update for other model ?

  4. caoxiaoyuyuyuyuyu commented on Aug 3, 2026

    @caoxiaoyuyuyuyuyu

    #self-assign

    I'd like to take the Flaubert subtask only. I plan to add the missing NormalizedTextConfig mapping and a focused offline regression test covering the normalized hidden size, attention heads, and layer count.

  5. BortnikMaxim commented on Aug 7, 2026

    @BortnikMaxim

    #self-assign LayoutLM subtask only. I will add the missing NormalizedConfigManager mapping and a focused offline test for hidden size, attention heads, and layer count.

  6. info-gallary commented on Aug 25, 2026

    @info-gallary

    #self-assign ConvBert subtask only.

    I’d like to add the missing ConvBert configuration mapping to ORTConfigManager and the corresponding focused tests. Please let me know if this subtask is still available.

  7. tomerzipori commented on Aug 28, 2026

    @tomerzipori

    #self-assign Data2VecText subtask only.

    I'll add its missing NormalizedConfigManager mapping and a focused offline regression test covering normalized hidden size, attention heads, and layer count.

  8. yomidotk commented on Sep 7, 2026

    @yomidotk

    #self-assign mobilebert subtask only. I will add the missing NormalizedConfigManager mapping and a focused test.

  9. nicolasdmolina commented on Sep 10, 2026

    @nicolasdmolina

    #self-assign XLM subtask only.

    I'll add XLM to NormalizedConfigManager (the current equivalent of ORTConfigManager). XLMOnnxConfig already exists in optimum-onnx, and XLMConfig uses emb_dim / n_heads / n_layers rather than the BERT-style names. I'll wire those attribute names and add a focused offline regression test.

  10. MohamedZakkaria2004 commented on Sep 19, 2026

    @MohamedZakkaria2004

    #self-assign Perceiver subtask only.

    I'd like to add the missing Perceiver mapping to NormalizedConfigManager. Perceiver uses d_latents for the latent self-attention representation and num_self_attention_heads for its self-attention head count, so I plan to add the corresponding normalized configuration mapping together with a focused offline regression test.

    I'll keep the PR scoped to the Perceiver subtask.

  11. UpadhyayKiran commented on Sep 22, 2026

    @UpadhyayKiran

    #self-assign PLBart subtask only.

    I'd like to add the missing PLBart mapping to NormalizedConfigManager together with a focused regression test.

    PLBartConfig exposes BART-style configuration attributes such as d_model, encoder_attention_heads, and encoder_layers, so I plan to verify the appropriate normalized configuration against the current Transformers implementation and keep the PR limited to PLBart support.

    Please let me know if this subtask is already being worked on.

  12. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign ConvNeXT subtask only. I'll add the missing NormalizedVisionConfig mapping to ORTConfigManager and a focused offline test covering image_size and num_channels.

  13. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign BEiT and LeViT subtasks. I'll add the missing NormalizedVisionConfig mappings to ORTConfigManager and focused offline tests covering image_size and num_channels for each, same pattern as ConvNeXT above.

  14. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign MobileViT and Hiera subtasks. I'll add the missing NormalizedVisionConfig mappings to ORTConfigManager and focused offline tests covering image_size and num_channels for each, same pattern as the ConvNeXT/BEiT/LeViT PRs above.

  15. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign ConvNeXtV2 and Data2VecVision subtasks. Same pattern as the ConvNeXT/BEiT/LeViT/MobileViT/Hiera PRs above: NormalizedVisionConfig mapping plus a focused offline test covering image_size and num_channels for each.

  16. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign DETR subtask. Its config resolves hidden_size/num_attention_heads/num_hidden_layers through its own attribute_map already, so plain NormalizedTextConfig works with no custom subclass -- adding the mapping plus a focused offline test.

  17. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign table-transformer subtask. Same situation as DETR (it's DETR-based) -- config resolves hidden_size/num_attention_heads/num_hidden_layers through its own attribute_map, so plain NormalizedTextConfig works, no custom subclass needed.

  18. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign LayoutLMv3 subtask. Config exposes hidden_size/num_attention_heads/num_hidden_layers directly (standard BERT-style naming), so plain NormalizedTextConfig works, no custom subclass needed. Note LayoutLMv2 does NOT have an ONNX config yet in this repo, so it's not actually eligible despite being on the checklist above.

  19. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign GroupViT subtask. Found a real bug along the way: NormalizedTextAndVisionConfig.getattr prefixes the raw accessor name onto the sub-config path instead of resolving it through the NUM_LAYERS-style mapping first -- e.g. .num_layers looks up a literal 'num_layers' attribute on text_config instead of 'num_hidden_layers'. This happens to work today only for Pix2Struct, because its text_config defines both spellings as synonyms; it silently breaks for GroupViT (and OwlViT/OwlV2/Siglip, same shape), whose sub-configs only have num_hidden_layers. Fixed the base class (regression-tested against Pix2Struct's existing values) and registered GroupViT via the now-correct Pix2StructNormalizedTextConfig.

  20. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign OwlViT subtask. Same shape as GroupViT (#2513, also open) and the same NormalizedTextAndVisionConfig.getattr fix applies -- carrying it here too since #2513 hasn't merged yet.

  21. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign OwlV2 subtask. Same shape and same NormalizedTextAndVisionConfig.getattr fix as GroupViT (#2513) and OwlViT (#2514).

  22. kratos0718 commented on Sep 22, 2026

    @kratos0718

    #self-assign SigLIP subtask. Same shape and same NormalizedTextAndVisionConfig.getattr fix as GroupViT (#2513), OwlViT (#2514), OwlV2 (#2515).

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