-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support more attributes from the Encoding structure #5
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MiniLM requires the attention mask to perform the mean pooling operation as can be seen at https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
daulet
reviewed
Jul 24, 2023
daulet
reviewed
Nov 9, 2023
daulet
reviewed
Nov 9, 2023
Before $ go test . -bench=. -benchmem -benchtime=10s
goos: linux
goarch: amd64
pkg: github.com/daulet/tokenizers
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkEncodeNTimes-8 885213 13053 ns/op 224 B/op 11 allocs/op
BenchmarkEncodeNChars-8 1000000000 2.351 ns/op 0 B/op 0 allocs/op
BenchmarkDecodeNTimes-8 2108638 5758 ns/op 96 B/op 3 allocs/op
BenchmarkDecodeNTokens-8 15591064 761.3 ns/op 7 B/op 0 allocs/op
PASS
ok github.com/daulet/tokenizers 59.096s After $ go test . -bench=. -benchmem -benchtime=10s
goos: linux
goarch: amd64
pkg: github.com/daulet/tokenizers
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkEncodeNTimes-8 935011 12774 ns/op 232 B/op 12 allocs/op
BenchmarkEncodeNChars-8 1000000000 1.962 ns/op 0 B/op 0 allocs/op
BenchmarkDecodeNTimes-8 2098053 5676 ns/op 96 B/op 3 allocs/op
BenchmarkDecodeNTokens-8 15740354 742.0 ns/op 7 B/op 0 allocs/op
PASS
ok github.com/daulet/tokenizers 57.765s |
daulet
approved these changes
Nov 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MiniLM requires the attention mask to perform the mean pooling operation as can be seen at
https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2