LLM-VM icon indicating copy to clipboard operation
LLM-VM copied to clipboard

Generalize HuggingFace models

Open fedegr opened this issue 1 year ago • 3 comments

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.

fedegr avatar Sep 02 '23 10:09 fedegr

This is a great idea, but we'll need overrides for optimizations! Thats the real work of the ticket.

mmirman avatar Sep 04 '23 16:09 mmirman

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...

fedegr avatar Sep 27 '23 17:09 fedegr

Hi, can I please work on that issue?

lucylililiwang avatar Feb 16 '24 17:02 lucylililiwang