-
Notifications
You must be signed in to change notification settings - Fork 570
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
Initial Cambrian integration #557
Conversation
src/oumi/models/experimental/cambrian/model/language_model/phi3/modeling_phi3.py
Outdated
Show resolved
Hide resolved
src/oumi/models/experimental/cambrian/model/language_model/cambrian_phi3.py
Show resolved
Hide resolved
src/oumi/models/experimental/cambrian/model/multimodal_encoder/builder.py
Show resolved
Hide resolved
src/oumi/builders/models.py
Outdated
@@ -19,6 +20,19 @@ | |||
except ImportError: | |||
liger_kernel = None | |||
|
|||
_IS_CAMBRIAN_AVAILABLE = False |
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.
Just for my information -- in what cases would the model not be available?
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.
These imports may fail if one of their transitive imports isn't available. Moved to build_cambrian()
src/oumi/builders/models.py
Outdated
@@ -19,6 +20,19 @@ | |||
except ImportError: | |||
liger_kernel = None | |||
|
|||
_IS_CAMBRIAN_AVAILABLE = False | |||
try: | |||
from oumi.models.experimental.cambrian.mm_utils import ( |
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.
To avoid importing those paths unless they are needed, we could:
a. Use importlib.findspec to test if available
b. Do the imports inside the build_cambrian_function.
Otherwise there is a risk that by importing these in the general case we might get errors because of missing dependencies used only by Cambrian
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.
moved to build_cambrian()
with find_spec()
train
andserve
for now.oumi
package hierarchyoumi
loggerBased on https://github.com/cambrian-mllm/cambrian/tree/78b97086cd96d84e62f45c7cee1b87386615a9a4
This is an initial import. It allows loading of pre-trained Cambrian models (including vision towers) with weights published on HF :
nyu-visionx/cambrian-phi3-3b
nyu-visionx/cambrian-8b
nyu-visionx/cambrian-13b
nyu-visionx/cambrian-34b
More work is needed to enable tuning, and inference.
Towards OPE-374, OPE-377