Skip to content

Commit

Permalink
Add support for nomic_bert
Browse files Browse the repository at this point in the history
Prevents unsupported model warnings
  • Loading branch information
xenova committed Feb 15, 2024
1 parent 3d1e0cc commit 2fa6218
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }
Expand Down Expand Up @@ -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]],
Expand Down

0 comments on commit 2fa6218

Please sign in to comment.