LLM-VM
LLM-VM copied to clipboard
Generalize HuggingFace models
Create a generalized class for all HuggingFace models, so adding one new model requires only setting up the required parameters instead of creating a new class.
This is a great idea, but we'll need overrides for optimizations! Thats the real work of the ticket.
My idea is to do something similar to https://github.com/anarchy-ai/LLM-VM/pull/159.
Instead of having multiple classes, generalize all HiggingFace model in a way that you can create multiple instances depending on which model you want to create. Then, you will have only one class, and adding support to a new model is just creating the config for that (maybe as a static method) without needing to copy+paste the full class.
On the other hand, if for some reason you need to implement some specific logic, you can always create a subclass of the new HuggingFaceModel class...
Hi, can I please work on that issue?