Generalize tokenizer, enable future parametrization of architectures#38
Open
Generalize tokenizer, enable future parametrization of architectures#38
Conversation
NB: this *FAILS*, someone in the call stack ignores it for our case…
akaIDIOT
commented
Apr 30, 2026
Comment on lines
+73
to
+77
| @pytest.mark.skipif(os.environ.get('CI') == 'true', reason="don't run this test on CI") | ||
| def test_embed_unknown_architecture(anchor, model): | ||
| with pytest.raises(KeyError, match='mips'): | ||
| # FIXME: this fails, kwargs are not passed along all the way to the tokenizer :( | ||
| model.encode(anchor, architecture='mips') |
Member
Author
There was a problem hiding this comment.
Note: this test fails, sentence_transformers.base.modules.transformer.Transformer.preprocess() does not pass it along... 🤔
(call stack visible by setting a breakpoint inside ASMTokenizer.tokenize())
Member
There was a problem hiding this comment.
Does ST contribute to this? Would this work differently in the refactor branch?
Member
Author
There was a problem hiding this comment.
Good question. The actual not passing along of that kwarg is ... not done by ST, so it might. I'll take a gander at the other branch, see if that alleviates the issue.
This file contains hidden or 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
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.
No description provided.