Skip to content

Commit

Permalink
refactor: use batch longest padding strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Jan 31, 2024
1 parent 7fe735e commit c5b3a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastembed.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func loadTokenizer(modelPath string, maxLength int) (*tokenizer.Tokenizer, error
Stride: 0,
})

paddingStrategy := tokenizer.NewPaddingStrategy(tokenizer.WithFixed(maxLength))
paddingStrategy := tokenizer.NewPaddingStrategy(tokenizer.WithBatchLongest())

paddingParams := tokenizer.PaddingParams{
Strategy: *paddingStrategy,
Expand Down

0 comments on commit c5b3a0c

Please sign in to comment.