Skip to content
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

to support Blip2 in mobile clip notebook #2347

Merged
merged 12 commits into from
Sep 5, 2024

Conversation

openvino-dev-samples
Copy link
Collaborator

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

fix import issues

fix import issues
fix dependency conflict

fix dependency conflict
Copy link

review-notebook-app bot commented Sep 4, 2024

View / edit / reply to this conversation on ReviewNB

eaidova commented on 2024-09-04T05:08:54Z
----------------------------------------------------------------

Line #4.    class blip2model(torch.nn.Module):

general code style in python to use CamelCase for classes nameing and lowercase underscore for class fields , variables and arguments, so

blip2model -> Blip2Model

Qformer -> q_former


Copy link

review-notebook-app bot commented Sep 4, 2024

View / edit / reply to this conversation on ReviewNB

eaidova commented on 2024-09-04T05:08:55Z
----------------------------------------------------------------

Line #12.    if model_type.value == "Blip2":

I see a lot of if-else statemet with the same actions, maybe it is better to move into reusable functions?


Copy link

review-notebook-app bot commented Sep 4, 2024

View / edit / reply to this conversation on ReviewNB

eaidova commented on 2024-09-04T05:08:55Z
----------------------------------------------------------------

I think it is not only Blip2 issue, CLIP generally mostly trained on English data, I think translation will be useful for other models as well. Can we make this description is more generic? Can we also high-light that we use optimum-intel for that and provide link on model card?


Copy link

review-notebook-app bot commented Sep 4, 2024

View / edit / reply to this conversation on ReviewNB

eaidova commented on 2024-09-04T05:08:56Z
----------------------------------------------------------------

Line #3.    trans_model_path = "ov_models/trans_model"

maybe it is better to be more specific and add languages in dir naming (potentially, if it will be requested in future, we can extend it on other languages)?


Copy link

review-notebook-app bot commented Sep 4, 2024

View / edit / reply to this conversation on ReviewNB

eaidova commented on 2024-09-04T05:08:57Z
----------------------------------------------------------------

maybe it will be also good to mention about translation in this description?


change the name of model path

change the name of model path
@eaidova eaidova merged commit b7528a5 into openvinotoolkit:latest Sep 5, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants