Skip to content

Commit

Permalink
Add vectors argument to Model2Vec vectors, closes #846
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Jan 7, 2025
1 parent 3852043 commit 2d8cf5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/python/txtai/vectors/m2v.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ def loadmodel(self, path):
return StaticModel.from_pretrained(path)

def encode(self, data):
return self.model.encode(data, batch_size=self.encodebatch)
# Additional model arguments
modelargs = self.config.get("vectors", {})

# Encode data
return self.model.encode(data, batch_size=self.encodebatch, **modelargs)

0 comments on commit 2d8cf5d

Please sign in to comment.