Skip to content

Commit e94a05c

Browse files
Add ModernBERT model
1 parent 55ec9ac commit e94a05c

File tree

4 files changed

+574
-0
lines changed

4 files changed

+574
-0
lines changed

lib/bumblebee.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ defmodule Bumblebee do
170170
"MistralModel" => {Bumblebee.Text.Mistral, :base},
171171
"MistralForCausalLM" => {Bumblebee.Text.Mistral, :for_causal_language_modeling},
172172
"MistralForSequenceClassification" => {Bumblebee.Text.Mistral, :for_sequence_classification},
173+
"ModernBertModel" => {Bumblebee.Text.ModernBert, :base},
174+
"ModernBertForMaskedLM" => {Bumblebee.Text.ModernBert, :for_masked_language_modeling},
175+
"ModernBertForSequenceClassification" =>
176+
{Bumblebee.Text.ModernBert, :for_sequence_classification},
177+
"ModernBertForTokenClassification" => {Bumblebee.Text.ModernBert, :for_token_classification},
173178
"PhiModel" => {Bumblebee.Text.Phi, :base},
174179
"PhiForCausalLM" => {Bumblebee.Text.Phi, :for_causal_language_modeling},
175180
"PhiForSequenceClassification" => {Bumblebee.Text.Phi, :for_sequence_classification},
@@ -256,6 +261,7 @@ defmodule Bumblebee do
256261
"llama" => :llama,
257262
"mistral" => :llama,
258263
"mbart" => :mbart,
264+
"modernbert" => :modernbert,
259265
"phi" => :code_gen,
260266
"phi3" => :llama,
261267
"roberta" => :roberta,

0 commit comments

Comments
 (0)