Skip to content

Commit

Permalink
add otter video
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangYuanhan-AI committed Sep 13, 2023
1 parent 883057d commit 5541381
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 238 deletions.
2 changes: 1 addition & 1 deletion pipeline/evaluation/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if __name__ == "__main__":
evaluator = load_dataset("mhbench", {"dataset_path": "ZhangYuanhan/multi-hop-reasoning"})
# model = load_model("llama_adapter", {"model_path": "/mnt/petrelfs/zhangyuanhan/Otter/pipeline/evaluation/ckpts/7B.pth"})
model = load_model("video_chat", {"model_path": ""})
model = load_model("otter_video", {"model_path": "/mnt/petrelfs/zhangyuanhan/Otter/checkpoint/OTTER-9B-DenseCaption"})
evaluator.evaluate(model)

# pip install otter_ai
Expand Down
2 changes: 1 addition & 1 deletion pipeline/evaluation/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import importlib

AVAILABLE_MODELS: Dict[str, str] = {"video_chat": "VideoChat", "llama_adapter": "LlamaAdapter"}
AVAILABLE_MODELS: Dict[str, str] = {"video_chat": "VideoChat", "llama_adapter": "LlamaAdapter", "otter_video": "OtterVideo"}


class BaseModel(ABC):
Expand Down
38 changes: 0 additions & 38 deletions pipeline/evaluation/models/idefics.py

This file was deleted.

86 changes: 0 additions & 86 deletions pipeline/evaluation/models/idefics_otter.py

This file was deleted.

78 changes: 0 additions & 78 deletions pipeline/evaluation/models/otter.py

This file was deleted.

Binary file added pipeline/evaluation/models/otter_video.py
Binary file not shown.
34 changes: 0 additions & 34 deletions pipeline/evaluation/models/run_idefics.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/otter_ai/models/otter/configuration_otter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from transformers.models.auto import CONFIG_MAPPING
from transformers.models.clip import CLIPVisionConfig

import sys
sys.path.append("/mnt/petrelfs/zhangyuanhan/Otter/src")
from otter_ai.models.flamingo.falcon.configuration_RW import RWConfig
from otter_ai.models.flamingo.mpt.configuration_mpt import MPTConfig
from otter_ai.models.flamingo.mpt_redpajama.configuration_mosaic_gpt import MosaicGPTConfig
Expand Down

0 comments on commit 5541381

Please sign in to comment.