Added new method in AutoTokenizer to load from local model folder.
Also added supporting unit tests at Tests/TokenizersTests/FactoryTests.swift
Although we could have simply loaded tokenizer_config.json and tokenizer.json files directly into configurations, I chose to go via LanguageModelConfigurationFromHub because it has it's own magic for choosing appropriate tokenizer class and it also selects fallback tokenizer if needed refer getter var tokenizerConfig: Config?
Resolves #76
Added new method in
AutoTokenizer
to load from local model folder.Also added supporting unit tests at
Tests/TokenizersTests/FactoryTests.swift
Although we could have simply loaded
tokenizer_config.json
andtokenizer.json
files directly into configurations, I chose to go viaLanguageModelConfigurationFromHub
because it has it's own magic for choosing appropriate tokenizer class and it also selects fallback tokenizer if needed refer getter var tokenizerConfig: Config?