fix: Missing get_input_embeddings / set_input_embeddings on NomicBertModel

#3
by Pringled - opened

NomicBertModel doesn't implement get_input_embeddings() or set_input_embeddings(), so the transformers fallback in EmbeddingAccessMixi tries to resolve them automatically. This fails because:

  • _input_embed_layer defaults to embed_tokens, but NomicBERT uses word_embeddings
  • base_model_prefix = "model", but __init__ creates self.embeddings, not self.model

Adding these two methods fixes this.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment