Skip to content

Add DeBERTa-v2 and DeBERTa-v3 base encoder support - #466

Open
hfiguera wants to merge 2 commits into
elixir-nx:mainfrom
hfiguera:deberta-v2-model
Open

hfiguera wants to merge 2 commits into
elixir-nx:mainfrom
hfiguera:deberta-v2-model

Conversation

@hfiguera

Copy link
Copy Markdown

Add the DeBERTa-v2/v3 base encoder as Bumblebee.Text.DebertaV2, with Hugging Face configuration/parameter mappings and DeBERTa Unigram tokenizer support.

The encoder supports absolute and relative positions, shared or separate position projections, content-to-position and position-to-content attention, logarithmic position buckets, optional convolution, padding masks, hidden states, and attention outputs. Tiny local checkpoints and their Python generation script cover five configurations.

Validation: all seven encoder, tokenizer, and configuration tests passed on macOS ARM64 and Linux x86_64. Outputs are compared with Python references, and loading checks reject missing, unused, or incorrectly shaped parameters. The integration runs used elixir-nx/nx#1842 and elixir-nx/axon#681. The encoder was also exercised with the real GLiNER 2.5 base checkpoint in the dependent entity-extraction contribution.

AI disclosure: most of this implementation was generated with an AI coding agent.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant