-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This suggests there's something wrong with the Model abstraction, and it means that any other model of a similar ilk to EnglishRoberta could not be supported (or not supported efficiently, or whatever reason caused this to be special-cased here). The special-casing should be removed and the abstraction fixed to make the special-casing unnecessary.
machinelearning/src/Microsoft.ML.Tokenizers/Tokenizer.cs
Lines 203 to 216 in 4635a86
| if (Model is EnglishRoberta robertaModel) | |
| { | |
| foreach (int id in ids) | |
| { | |
| tokens.Add(robertaModel.IdToFilteredToken(id, skipSpecialTokens) ?? ""); | |
| } | |
| } | |
| else | |
| { | |
| foreach (int id in ids) | |
| { | |
| tokens.Add(Model.IdToToken(id, skipSpecialTokens) ?? ""); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working