-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added moondream and llava. #2154
Conversation
All accuracy and tests are passing on A100 for both llava and moondream. |
|
||
PATCH_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "patches") | ||
|
||
def cache_model(name: str, **kwargs): | ||
import transformers | ||
model_config = eval(class_models[name][2]) | ||
model_ctor = getattr(transformers, class_models[name][3]) | ||
model_ctor.from_config(model_config, **kwargs) | ||
print(model_config.__class__.__name__) | ||
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these prints for debugging purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments
model_ctor.from_config(model_config, **kwargs) | ||
print(model_config.__class__.__name__) | ||
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") | ||
if (model_config.__class__.__name__ is "PhiConfig" or "LlavaConfig"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering why we can't use the same code from model_factory.py
to determine whether from_config
should be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes errors w/ runs for other HF models (feel free to test & replicate)
The models have been added by #2176 |
No description provided.