rustformers / llm

[Unmaintained, see README] An ecosystem of Rust libraries for working with large language models
https://docs.rs/llm/latest/llm/
Apache License 2.0
6.06k stars 350 forks source link

Support Separate Loading of Vocabulary or Tensors #445

Open skirodev opened 6 months ago

skirodev commented 6 months ago

We can provide parameters during model loading, such as "vocab_only" and "tensor_only". Loading only the vocabulary can be useful in cases where only the tokenizer is needed, while loading only tensors would be suitable for certain visual models.

I'm open to hearing any suggestions or advice regarding whether it would be better to implement a separate TokenizerModel or make modifications within the existing Model. Any suggestions would be greatly appreciated.