From 2fa6218459a2d1af2e6b7d29f37001c00d751e37 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Thu, 15 Feb 2024 19:53:42 +0200 Subject: [PATCH] Add support for `nomic_bert` Prevents unsupported model warnings --- src/models.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/models.js b/src/models.js index 789f853fe..ec1e73f55 100644 --- a/src/models.js +++ b/src/models.js @@ -1471,6 +1471,12 @@ export class BertForQuestionAnswering extends BertPreTrainedModel { } ////////////////////////////////////////////////// +////////////////////////////////////////////////// +// NomicBert models +export class NomicBertPreTrainedModel extends PreTrainedModel { } +export class NomicBertModel extends NomicBertPreTrainedModel { } +////////////////////////////////////////////////// + ////////////////////////////////////////////////// // RoFormer models export class RoFormerPreTrainedModel extends PreTrainedModel { } @@ -5177,6 +5183,7 @@ export class PretrainedMixin { const MODEL_MAPPING_NAMES_ENCODER_ONLY = new Map([ ['bert', ['BertModel', BertModel]], + ['nomic_bert', ['NomicBertModel', NomicBertModel]], ['roformer', ['RoFormerModel', RoFormerModel]], ['electra', ['ElectraModel', ElectraModel]], ['esm', ['EsmModel', EsmModel]],