swift-models
swift-models copied to clipboard
Replace Vocabulary attributes with BijectiveDictionary
In Vocabulary, the attributes tokensToIds and idsToTokens are a good candidate for replacement with BijectiveDictionary. BERT and GPT2 both use Vocabulary, so ensure that functionality remains after the switch.