diff --git a/src/configs.js b/src/configs.js index 5b7dcb6f3..9cf4c3655 100644 --- a/src/configs.js +++ b/src/configs.js @@ -111,6 +111,7 @@ function getNormalizedConfig(config) { case 'llama': case 'llama4_text': case 'nanochat': + case 'apertus': case 'arcee': case 'lfm2': case 'smollm3': diff --git a/src/models.js b/src/models.js index 00ff7403f..fc3eed8ef 100644 --- a/src/models.js +++ b/src/models.js @@ -4766,6 +4766,13 @@ export class NanoChatModel extends NanoChatPreTrainedModel {} export class NanoChatForCausalLM extends NanoChatPreTrainedModel {} ////////////////////////////////////////////////// +////////////////////////////////////////////////// +// Apertus models +export class ApertusPreTrainedModel extends PreTrainedModel {} +export class ApertusModel extends ApertusPreTrainedModel {} +export class ApertusForCausalLM extends ApertusPreTrainedModel {} +////////////////////////////////////////////////// + ////////////////////////////////////////////////// // Arcee models export class ArceePreTrainedModel extends PreTrainedModel {} @@ -8259,6 +8266,7 @@ const MODEL_MAPPING_NAMES_DECODER_ONLY = new Map([ ['gpt_neox', ['GPTNeoXModel', GPTNeoXModel]], ['codegen', ['CodeGenModel', CodeGenModel]], ['llama', ['LlamaModel', LlamaModel]], + ['apertus', ['ApertusModel', ApertusModel]], ['nanochat', ['NanoChatModel', NanoChatModel]], ['arcee', ['ArceeModel', ArceeModel]], ['lfm2', ['Lfm2Model', Lfm2Model]], @@ -8372,6 +8380,7 @@ const MODEL_FOR_CAUSAL_LM_MAPPING_NAMES = new Map([ ['codegen', ['CodeGenForCausalLM', CodeGenForCausalLM]], ['llama', ['LlamaForCausalLM', LlamaForCausalLM]], ['nanochat', ['NanoChatForCausalLM', NanoChatForCausalLM]], + ['apertus', ['ApertusForCausalLM', ApertusForCausalLM]], ['llama4_text', ['Llama4ForCausalLM', Llama4ForCausalLM]], ['arcee', ['ArceeForCausalLM', ArceeForCausalLM]], ['lfm2', ['Lfm2ForCausalLM', Lfm2ForCausalLM]],