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

[Feature] Support InstructBLIP #1685

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

techmonsterwang
Copy link
Collaborator

Add InstructBLIP Implementation

@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Patch coverage: 33.72% and project coverage change: -3.03 ⚠️

Comparison is base (f9dcae2) 68.16% compared to head (8c43282) 65.13%.

❗ Current head 8c43282 differs from pull request most recent head 807ce32. Consider uploading reports for the commit 807ce32 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1685      +/-   ##
==========================================
- Coverage   68.16%   65.13%   -3.03%     
==========================================
  Files         295      332      +37     
  Lines       23372    25847    +2475     
  Branches     3713     4130     +417     
==========================================
+ Hits        15932    16836     +904     
- Misses       6880     8393    +1513     
- Partials      560      618      +58     
Flag Coverage Δ
unittests 65.13% <33.72%> (-3.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpretrain/apis/feature_extractor.py 37.50% <0.00%> (ø)
mmpretrain/apis/image_caption.py 30.64% <0.00%> (ø)
mmpretrain/apis/image_retrieval.py 21.42% <0.00%> (ø)
mmpretrain/apis/visual_grounding.py 27.53% <0.00%> (ø)
mmpretrain/apis/visual_question_answering.py 25.67% <0.00%> (ø)
mmpretrain/datasets/__init__.py 60.46% <0.00%> (-13.83%) ⬇️
mmpretrain/datasets/flickr30k_caption.py 0.00% <0.00%> (ø)
mmpretrain/datasets/flickr30k_retrieval.py 0.00% <0.00%> (ø)
mmpretrain/datasets/gqa_dataset.py 0.00% <0.00%> (ø)
mmpretrain/datasets/nocaps.py 0.00% <0.00%> (ø)
... and 65 more

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@techmonsterwang techmonsterwang changed the base branch from main to dev July 5, 2023 07:52
@fangyixiao18 fangyixiao18 changed the title Instructblip [Feature] Support InstructBLIP Jul 13, 2023
@@ -0,0 +1,53 @@
# MiniGPT4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# MiniGPT4
# InstructBLIP


## Models and results

For Vicuna model, please refer to [MiniGPT-4 page](https://github.com/Vision-CAIR/MiniGPT-4) for preparation guidelines.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -52,8 +52,13 @@
'https://download.openmmlab.com/mmpretrain/v1.0/minigpt4/minigpt-4_qformer_20230615-1dfa889c.pth' # noqa
),
lang_encoder=dict(
type='AutoModelForCausalLM', name_or_path='YOUR_PATH_TO_VICUNA'),
tokenizer=dict(type='LlamaTokenizer', name_or_path='YOUR_PATH_TO_VICUNA'),
type='AutoModelForCausalLM',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz restore the modification

llm_tokenizer=dict(
type='LlamaTokenizer',
name_or_path=
'/mnt/petrelfs/share_data/liuyuan/llm_weights/vicuna_weights_7b'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use our path

text_backbone=dict(
type='AutoModelForCausalLM',
name_or_path=
'/mnt/petrelfs/share_data/liuyuan/llm_weights/vicuna_weights_7b'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same comment as above

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you upload this image

test.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the this test file



@MODELS.register_module()
class InstructBlipCaption(BaseModel):
Copy link
Collaborator

@fangyixiao18 fangyixiao18 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz remove caption suffix and add 'task' arg in init

@FDInSky
Copy link

FDInSky commented Nov 6, 2023

when will merge this? we need to use it. Thanks

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.

4 participants