diff --git a/pipeline/demo/otter_image.ipynb b/pipeline/demo/otter_image.ipynb index cec20637..896e824f 100755 --- a/pipeline/demo/otter_image.ipynb +++ b/pipeline/demo/otter_image.ipynb @@ -24,7 +24,7 @@ "import sys\n", "\n", "sys.path.append(\"../../src\")\n", - "from otter import OtterForConditionalGeneration\n", + "from otter_ai import OtterForConditionalGeneration\n", "\n", "model = OtterForConditionalGeneration.from_pretrained(\"luodian/OTTER-9B-LA-InContext\", device_map=\"auto\")\n", "tokenizer = model.text_tokenizer\n", diff --git a/pipeline/demo/otter_image.py b/pipeline/demo/otter_image.py index a9273fde..0ffb390a 100755 --- a/pipeline/demo/otter_image.py +++ b/pipeline/demo/otter_image.py @@ -13,7 +13,7 @@ sys.path.append("../../src") -from otter import OtterForConditionalGeneration +from otter_ai import OtterForConditionalGeneration # Disable warnings diff --git a/pipeline/demo/otter_image_incontext.py b/pipeline/demo/otter_image_incontext.py index 40fd6f8b..626b6dd9 100644 --- a/pipeline/demo/otter_image_incontext.py +++ b/pipeline/demo/otter_image_incontext.py @@ -13,7 +13,7 @@ sys.path.append("../../src") -from otter import OtterForConditionalGeneration +from otter_ai import OtterForConditionalGeneration # Disable warnings diff --git a/pipeline/demo/otter_video.ipynb b/pipeline/demo/otter_video.ipynb index 86f975e2..89c4176b 100755 --- a/pipeline/demo/otter_video.ipynb +++ b/pipeline/demo/otter_video.ipynb @@ -28,7 +28,7 @@ "import sys\n", "\n", "sys.path.append(\"../../src\")\n", - "from otter import OtterForConditionalGeneration\n", + "from otter_ai import OtterForConditionalGeneration\n", "\n", "# Disable warnings\n", "requests.packages.urllib3.disable_warnings()" diff --git a/pipeline/demo/otter_video.py b/pipeline/demo/otter_video.py index 21078f26..f33b6650 100644 --- a/pipeline/demo/otter_video.py +++ b/pipeline/demo/otter_video.py @@ -10,7 +10,7 @@ sys.path.append("../../src") # make sure you can properly access the otter folder -from otter import OtterForConditionalGeneration +from otter_ai import OtterForConditionalGeneration # Disable warnings requests.packages.urllib3.disable_warnings() diff --git a/pipeline/eval/models/otter.py b/pipeline/eval/models/otter.py index 45eed946..153a0335 100644 --- a/pipeline/eval/models/otter.py +++ b/pipeline/eval/models/otter.py @@ -7,7 +7,7 @@ from pipeline.eval.eval_model import BaseEvalModel from contextlib import suppress from pipeline.eval.models.utils import unwrap_model -from otter import OtterForConditionalGeneration +from otter_ai import OtterForConditionalGeneration import os os.environ["TOKENIZERS_PARALLELISM"] = "false" diff --git a/pipeline/serve/model_worker.py b/pipeline/serve/model_worker.py index 613df3d8..01f62546 100755 --- a/pipeline/serve/model_worker.py +++ b/pipeline/serve/model_worker.py @@ -28,7 +28,7 @@ ) from huggingface_hub import hf_hub_download import transformers -from otter import OtterForConditionalGeneration +from otter_ai import OtterForConditionalGeneration from flamingo import FlamingoForConditionalGeneration GB = 1 << 30 diff --git a/pipeline/train/instruction_following.py b/pipeline/train/instruction_following.py index 57d00eb4..83e1acb4 100755 --- a/pipeline/train/instruction_following.py +++ b/pipeline/train/instruction_following.py @@ -21,8 +21,8 @@ import wandb -from otter import OtterForConditionalGeneration -from otter import FlamingoForConditionalGeneration +from otter_ai import OtterForConditionalGeneration +from otter_ai import FlamingoForConditionalGeneration from pipeline.train.data import get_data from pipeline.train.distributed import world_info_from_env from pipeline.train.train_utils import AverageMeter, get_checkpoint, get_image_attention_mask diff --git a/pipeline/train/pretraining.py b/pipeline/train/pretraining.py index 78c86820..a73e34cb 100644 --- a/pipeline/train/pretraining.py +++ b/pipeline/train/pretraining.py @@ -19,8 +19,8 @@ ) import wandb -from otter import FlamingoForConditionalGeneration -from otter import OtterForConditionalGeneration +from otter_ai import FlamingoForConditionalGeneration +from otter_ai import OtterForConditionalGeneration from pipeline.train.data import get_data from pipeline.train.distributed import world_info_from_env from pipeline.train.train_utils import AverageMeter, get_checkpoint diff --git a/pipeline/train/pretraining_cc3m.py b/pipeline/train/pretraining_cc3m.py index eac9ba0e..b3f90235 100644 --- a/pipeline/train/pretraining_cc3m.py +++ b/pipeline/train/pretraining_cc3m.py @@ -19,8 +19,8 @@ get_linear_schedule_with_warmup, ) import wandb -from otter import FlamingoForConditionalGeneration -from otter import OtterForConditionalGeneration +from otter_ai import FlamingoForConditionalGeneration +from otter_ai import OtterForConditionalGeneration from pipeline.train.data import get_data from pipeline.train.distributed import world_info_from_env from pipeline.train.train_utils import AverageMeter, get_checkpoint diff --git a/setup.py b/setup.py index 037c006b..8c3023b6 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="otter-ai", - version="0.0.0-alpha", + version="0.0.0-alpha-2", packages=find_packages(where="src"), package_dir={"": "src"}, install_requires=requirements, @@ -15,8 +15,8 @@ # "otter": ["resources/**/*"], # }, # include_package_data=True, - author="Bo Li, Yuanhan Zhang, Liangyu Chen, Jinghao Wang, Fanyi Pu, Jingkang Yang, Chunyuan Li, Ziwei Liu", - author_email="LIBO0013@e.ntu.edu.sg, YUANHAN002@e.ntu.edu.sg, LCHEN025@e.ntu.edu.sg, JINGHAO003@e.ntu.edu.sg, FPU001@e.ntu.edu.sg, chunyl@microsoft.com, ziwei.liu@ntu.edu.sg", + author="Otter Team", + author_email="drluodian@gmail.com", description="Otter: A Multi-Modal Model with In-Context Instruction Tuning", long_description=open("README.md").read(), long_description_content_type="text/markdown", diff --git a/src/otter/__init__.py b/src/otter_ai/__init__.py similarity index 100% rename from src/otter/__init__.py rename to src/otter_ai/__init__.py diff --git a/src/otter/models/__init__.py b/src/otter_ai/models/__init__.py similarity index 100% rename from src/otter/models/__init__.py rename to src/otter_ai/models/__init__.py diff --git a/src/otter/models/flamingo/__init__.py b/src/otter_ai/models/flamingo/__init__.py similarity index 100% rename from src/otter/models/flamingo/__init__.py rename to src/otter_ai/models/flamingo/__init__.py diff --git a/src/otter/models/flamingo/config.json b/src/otter_ai/models/flamingo/config.json similarity index 100% rename from src/otter/models/flamingo/config.json rename to src/otter_ai/models/flamingo/config.json diff --git a/src/otter/models/flamingo/configuration_flamingo.py b/src/otter_ai/models/flamingo/configuration_flamingo.py similarity index 100% rename from src/otter/models/flamingo/configuration_flamingo.py rename to src/otter_ai/models/flamingo/configuration_flamingo.py diff --git a/src/otter/models/flamingo/converting_flamingo_to_bf16.py b/src/otter_ai/models/flamingo/converting_flamingo_to_bf16.py similarity index 100% rename from src/otter/models/flamingo/converting_flamingo_to_bf16.py rename to src/otter_ai/models/flamingo/converting_flamingo_to_bf16.py diff --git a/src/otter/models/flamingo/converting_flamingo_to_hf.py b/src/otter_ai/models/flamingo/converting_flamingo_to_hf.py similarity index 100% rename from src/otter/models/flamingo/converting_flamingo_to_hf.py rename to src/otter_ai/models/flamingo/converting_flamingo_to_hf.py diff --git a/src/otter/models/flamingo/converting_flamingo_to_lora.py b/src/otter_ai/models/flamingo/converting_flamingo_to_lora.py similarity index 100% rename from src/otter/models/flamingo/converting_flamingo_to_lora.py rename to src/otter_ai/models/flamingo/converting_flamingo_to_lora.py diff --git a/src/otter/models/flamingo/falcon/__init__.py b/src/otter_ai/models/flamingo/falcon/__init__.py similarity index 100% rename from src/otter/models/flamingo/falcon/__init__.py rename to src/otter_ai/models/flamingo/falcon/__init__.py diff --git a/src/otter/models/flamingo/falcon/configuration_RW.py b/src/otter_ai/models/flamingo/falcon/configuration_RW.py similarity index 100% rename from src/otter/models/flamingo/falcon/configuration_RW.py rename to src/otter_ai/models/flamingo/falcon/configuration_RW.py diff --git a/src/otter/models/flamingo/falcon/modelling_RW.py b/src/otter_ai/models/flamingo/falcon/modelling_RW.py similarity index 100% rename from src/otter/models/flamingo/falcon/modelling_RW.py rename to src/otter_ai/models/flamingo/falcon/modelling_RW.py diff --git a/src/otter/models/flamingo/flamingo-falcon-7B.json b/src/otter_ai/models/flamingo/flamingo-falcon-7B.json similarity index 100% rename from src/otter/models/flamingo/flamingo-falcon-7B.json rename to src/otter_ai/models/flamingo/flamingo-falcon-7B.json diff --git a/src/otter/models/flamingo/flamingo-llama2-chat-13B.json b/src/otter_ai/models/flamingo/flamingo-llama2-chat-13B.json similarity index 100% rename from src/otter/models/flamingo/flamingo-llama2-chat-13B.json rename to src/otter_ai/models/flamingo/flamingo-llama2-chat-13B.json diff --git a/src/otter/models/flamingo/flamingo-llama2-chat-7B.json b/src/otter_ai/models/flamingo/flamingo-llama2-chat-7B.json similarity index 100% rename from src/otter/models/flamingo/flamingo-llama2-chat-7B.json rename to src/otter_ai/models/flamingo/flamingo-llama2-chat-7B.json diff --git a/src/otter/models/flamingo/flamingo-mpt-1B-redpajama.json b/src/otter_ai/models/flamingo/flamingo-mpt-1B-redpajama.json similarity index 100% rename from src/otter/models/flamingo/flamingo-mpt-1B-redpajama.json rename to src/otter_ai/models/flamingo/flamingo-mpt-1B-redpajama.json diff --git a/src/otter/models/flamingo/flamingo-mpt-30B-bf16.json b/src/otter_ai/models/flamingo/flamingo-mpt-30B-bf16.json similarity index 100% rename from src/otter/models/flamingo/flamingo-mpt-30B-bf16.json rename to src/otter_ai/models/flamingo/flamingo-mpt-30B-bf16.json diff --git a/src/otter/models/flamingo/flamingo-mpt-30B.json b/src/otter_ai/models/flamingo/flamingo-mpt-30B.json similarity index 100% rename from src/otter/models/flamingo/flamingo-mpt-30B.json rename to src/otter_ai/models/flamingo/flamingo-mpt-30B.json diff --git a/src/otter/models/flamingo/flamingo-mpt-7B.json b/src/otter_ai/models/flamingo/flamingo-mpt-7B.json similarity index 100% rename from src/otter/models/flamingo/flamingo-mpt-7B.json rename to src/otter_ai/models/flamingo/flamingo-mpt-7B.json diff --git a/src/otter/models/flamingo/flamingo-vicuna-33B-v1.3.json b/src/otter_ai/models/flamingo/flamingo-vicuna-33B-v1.3.json similarity index 100% rename from src/otter/models/flamingo/flamingo-vicuna-33B-v1.3.json rename to src/otter_ai/models/flamingo/flamingo-vicuna-33B-v1.3.json diff --git a/src/otter/models/flamingo/flamingo-vicuna-7B-v1.3.json b/src/otter_ai/models/flamingo/flamingo-vicuna-7B-v1.3.json similarity index 100% rename from src/otter/models/flamingo/flamingo-vicuna-7B-v1.3.json rename to src/otter_ai/models/flamingo/flamingo-vicuna-7B-v1.3.json diff --git a/src/otter/models/flamingo/injecting_falcon_into_flamingo.py b/src/otter_ai/models/flamingo/injecting_falcon_into_flamingo.py similarity index 100% rename from src/otter/models/flamingo/injecting_falcon_into_flamingo.py rename to src/otter_ai/models/flamingo/injecting_falcon_into_flamingo.py diff --git a/src/otter/models/flamingo/injecting_llama2_into_flamingo.py b/src/otter_ai/models/flamingo/injecting_llama2_into_flamingo.py similarity index 100% rename from src/otter/models/flamingo/injecting_llama2_into_flamingo.py rename to src/otter_ai/models/flamingo/injecting_llama2_into_flamingo.py diff --git a/src/otter/models/flamingo/injecting_mpt-1B-redpajama_into_flamingo.py b/src/otter_ai/models/flamingo/injecting_mpt-1B-redpajama_into_flamingo.py similarity index 100% rename from src/otter/models/flamingo/injecting_mpt-1B-redpajama_into_flamingo.py rename to src/otter_ai/models/flamingo/injecting_mpt-1B-redpajama_into_flamingo.py diff --git a/src/otter/models/flamingo/injecting_mpt_into_flamingo.py b/src/otter_ai/models/flamingo/injecting_mpt_into_flamingo.py similarity index 100% rename from src/otter/models/flamingo/injecting_mpt_into_flamingo.py rename to src/otter_ai/models/flamingo/injecting_mpt_into_flamingo.py diff --git a/src/otter/models/flamingo/injecting_vicuna_into_flamingo.py b/src/otter_ai/models/flamingo/injecting_vicuna_into_flamingo.py similarity index 100% rename from src/otter/models/flamingo/injecting_vicuna_into_flamingo.py rename to src/otter_ai/models/flamingo/injecting_vicuna_into_flamingo.py diff --git a/src/otter/models/flamingo/modeling_flamingo.py b/src/otter_ai/models/flamingo/modeling_flamingo.py similarity index 100% rename from src/otter/models/flamingo/modeling_flamingo.py rename to src/otter_ai/models/flamingo/modeling_flamingo.py diff --git a/src/otter/models/flamingo/mpt/__init__.py b/src/otter_ai/models/flamingo/mpt/__init__.py similarity index 100% rename from src/otter/models/flamingo/mpt/__init__.py rename to src/otter_ai/models/flamingo/mpt/__init__.py diff --git a/src/otter/models/flamingo/mpt/adapt_tokenizer.py b/src/otter_ai/models/flamingo/mpt/adapt_tokenizer.py similarity index 100% rename from src/otter/models/flamingo/mpt/adapt_tokenizer.py rename to src/otter_ai/models/flamingo/mpt/adapt_tokenizer.py diff --git a/src/otter/models/flamingo/mpt/attention.py b/src/otter_ai/models/flamingo/mpt/attention.py similarity index 100% rename from src/otter/models/flamingo/mpt/attention.py rename to src/otter_ai/models/flamingo/mpt/attention.py diff --git a/src/otter/models/flamingo/mpt/blocks.py b/src/otter_ai/models/flamingo/mpt/blocks.py similarity index 100% rename from src/otter/models/flamingo/mpt/blocks.py rename to src/otter_ai/models/flamingo/mpt/blocks.py diff --git a/src/otter/models/flamingo/mpt/configuration_mpt.py b/src/otter_ai/models/flamingo/mpt/configuration_mpt.py similarity index 100% rename from src/otter/models/flamingo/mpt/configuration_mpt.py rename to src/otter_ai/models/flamingo/mpt/configuration_mpt.py diff --git a/src/otter/models/flamingo/mpt/custom_embedding.py b/src/otter_ai/models/flamingo/mpt/custom_embedding.py similarity index 100% rename from src/otter/models/flamingo/mpt/custom_embedding.py rename to src/otter_ai/models/flamingo/mpt/custom_embedding.py diff --git a/src/otter/models/flamingo/mpt/flash_attn_triton.py b/src/otter_ai/models/flamingo/mpt/flash_attn_triton.py similarity index 100% rename from src/otter/models/flamingo/mpt/flash_attn_triton.py rename to src/otter_ai/models/flamingo/mpt/flash_attn_triton.py diff --git a/src/otter/models/flamingo/mpt/hf_prefixlm_converter.py b/src/otter_ai/models/flamingo/mpt/hf_prefixlm_converter.py similarity index 100% rename from src/otter/models/flamingo/mpt/hf_prefixlm_converter.py rename to src/otter_ai/models/flamingo/mpt/hf_prefixlm_converter.py diff --git a/src/otter/models/flamingo/mpt/meta_init_context.py b/src/otter_ai/models/flamingo/mpt/meta_init_context.py similarity index 100% rename from src/otter/models/flamingo/mpt/meta_init_context.py rename to src/otter_ai/models/flamingo/mpt/meta_init_context.py diff --git a/src/otter/models/flamingo/mpt/modeling_mpt.py b/src/otter_ai/models/flamingo/mpt/modeling_mpt.py similarity index 100% rename from src/otter/models/flamingo/mpt/modeling_mpt.py rename to src/otter_ai/models/flamingo/mpt/modeling_mpt.py diff --git a/src/otter/models/flamingo/mpt/norm.py b/src/otter_ai/models/flamingo/mpt/norm.py similarity index 100% rename from src/otter/models/flamingo/mpt/norm.py rename to src/otter_ai/models/flamingo/mpt/norm.py diff --git a/src/otter/models/flamingo/mpt/param_init_fns.py b/src/otter_ai/models/flamingo/mpt/param_init_fns.py similarity index 100% rename from src/otter/models/flamingo/mpt/param_init_fns.py rename to src/otter_ai/models/flamingo/mpt/param_init_fns.py diff --git a/src/otter/models/flamingo/mpt_redpajama/__init__.py b/src/otter_ai/models/flamingo/mpt_redpajama/__init__.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/__init__.py rename to src/otter_ai/models/flamingo/mpt_redpajama/__init__.py diff --git a/src/otter/models/flamingo/mpt_redpajama/attention.py b/src/otter_ai/models/flamingo/mpt_redpajama/attention.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/attention.py rename to src/otter_ai/models/flamingo/mpt_redpajama/attention.py diff --git a/src/otter/models/flamingo/mpt_redpajama/configuration_mosaic_gpt.py b/src/otter_ai/models/flamingo/mpt_redpajama/configuration_mosaic_gpt.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/configuration_mosaic_gpt.py rename to src/otter_ai/models/flamingo/mpt_redpajama/configuration_mosaic_gpt.py diff --git a/src/otter/models/flamingo/mpt_redpajama/gpt_blocks.py b/src/otter_ai/models/flamingo/mpt_redpajama/gpt_blocks.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/gpt_blocks.py rename to src/otter_ai/models/flamingo/mpt_redpajama/gpt_blocks.py diff --git a/src/otter/models/flamingo/mpt_redpajama/low_precision_layernorm.py b/src/otter_ai/models/flamingo/mpt_redpajama/low_precision_layernorm.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/low_precision_layernorm.py rename to src/otter_ai/models/flamingo/mpt_redpajama/low_precision_layernorm.py diff --git a/src/otter/models/flamingo/mpt_redpajama/mosaic_gpt.py b/src/otter_ai/models/flamingo/mpt_redpajama/mosaic_gpt.py similarity index 99% rename from src/otter/models/flamingo/mpt_redpajama/mosaic_gpt.py rename to src/otter_ai/models/flamingo/mpt_redpajama/mosaic_gpt.py index 871ba146..613a6f17 100644 --- a/src/otter/models/flamingo/mpt_redpajama/mosaic_gpt.py +++ b/src/otter_ai/models/flamingo/mpt_redpajama/mosaic_gpt.py @@ -16,7 +16,7 @@ from transformers import PreTrainedModel from transformers.modeling_outputs import CausalLMOutputWithPast -from otter.models.flamingo.mpt.custom_embedding import SharedEmbedding +from otter_ai.models.flamingo.mpt.custom_embedding import SharedEmbedding from .attention import attn_bias as module_attn_bias from .attention import attn_bias_shape as module_attn_bias_shape diff --git a/src/otter/models/flamingo/mpt_redpajama/param_init_fns.py b/src/otter_ai/models/flamingo/mpt_redpajama/param_init_fns.py similarity index 100% rename from src/otter/models/flamingo/mpt_redpajama/param_init_fns.py rename to src/otter_ai/models/flamingo/mpt_redpajama/param_init_fns.py diff --git a/src/otter/models/flamingo/utils.py b/src/otter_ai/models/flamingo/utils.py similarity index 100% rename from src/otter/models/flamingo/utils.py rename to src/otter_ai/models/flamingo/utils.py diff --git a/src/otter/models/otter/Otter-MPT7B-config.json b/src/otter_ai/models/otter/Otter-MPT7B-config.json similarity index 100% rename from src/otter/models/otter/Otter-MPT7B-config.json rename to src/otter_ai/models/otter/Otter-MPT7B-config.json diff --git a/src/otter/models/otter/__init__.py b/src/otter_ai/models/otter/__init__.py similarity index 100% rename from src/otter/models/otter/__init__.py rename to src/otter_ai/models/otter/__init__.py diff --git a/src/otter/models/otter/config.json b/src/otter_ai/models/otter/config.json similarity index 100% rename from src/otter/models/otter/config.json rename to src/otter_ai/models/otter/config.json diff --git a/src/otter/models/otter/configuration_otter.py b/src/otter_ai/models/otter/configuration_otter.py similarity index 94% rename from src/otter/models/otter/configuration_otter.py rename to src/otter_ai/models/otter/configuration_otter.py index b0e3873a..a32136ab 100644 --- a/src/otter/models/otter/configuration_otter.py +++ b/src/otter_ai/models/otter/configuration_otter.py @@ -5,9 +5,9 @@ from transformers.models.auto import CONFIG_MAPPING from transformers.models.clip import CLIPVisionConfig -from otter.models.flamingo.falcon.configuration_RW import RWConfig -from otter.models.flamingo.mpt.configuration_mpt import MPTConfig -from otter.models.flamingo.mpt_redpajama.configuration_mosaic_gpt import MosaicGPTConfig +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 logger = logging.get_logger(__name__) diff --git a/src/otter/models/otter/converting_flamingo_to_otter.py b/src/otter_ai/models/otter/converting_flamingo_to_otter.py similarity index 88% rename from src/otter/models/otter/converting_flamingo_to_otter.py rename to src/otter_ai/models/otter/converting_flamingo_to_otter.py index 97ccb94e..114688ae 100644 --- a/src/otter/models/otter/converting_flamingo_to_otter.py +++ b/src/otter_ai/models/otter/converting_flamingo_to_otter.py @@ -2,8 +2,8 @@ # You can use it in parent folder by running: python -m models.otter.converting_flamingo_to_otter --checkpoint_path --save_path import argparse import torch -from otter.models.otter.modeling_otter import OtterForConditionalGeneration -from otter.models.flamingo.modeling_flamingo import FlamingoForConditionalGeneration +from otter_ai.models.otter.modeling_otter import OtterForConditionalGeneration +from otter_ai.models.flamingo.modeling_flamingo import FlamingoForConditionalGeneration # Define argument parser parser = argparse.ArgumentParser(description="Load a model with specified precision and save it to a specified path.") diff --git a/src/otter/models/otter/converting_otter_fp32_to_fp16.py b/src/otter_ai/models/otter/converting_otter_fp32_to_fp16.py similarity index 93% rename from src/otter/models/otter/converting_otter_fp32_to_fp16.py rename to src/otter_ai/models/otter/converting_otter_fp32_to_fp16.py index 3d431d35..373b8b53 100644 --- a/src/otter/models/otter/converting_otter_fp32_to_fp16.py +++ b/src/otter_ai/models/otter/converting_otter_fp32_to_fp16.py @@ -1,6 +1,6 @@ import argparse import torch -from otter.models.otter.modeling_otter import OtterForConditionalGeneration +from otter_ai.models.otter.modeling_otter import OtterForConditionalGeneration # Define argument parser parser = argparse.ArgumentParser(description="Load a model with specified precision and save it to a specified path.") diff --git a/src/otter/models/otter/converting_otter_pt_to_hf.py b/src/otter_ai/models/otter/converting_otter_pt_to_hf.py similarity index 100% rename from src/otter/models/otter/converting_otter_pt_to_hf.py rename to src/otter_ai/models/otter/converting_otter_pt_to_hf.py diff --git a/src/otter/models/otter/converting_otter_to_lora.py b/src/otter_ai/models/otter/converting_otter_to_lora.py similarity index 100% rename from src/otter/models/otter/converting_otter_to_lora.py rename to src/otter_ai/models/otter/converting_otter_to_lora.py diff --git a/src/otter/models/otter/flamingo_pt2otter_hf.py b/src/otter_ai/models/otter/flamingo_pt2otter_hf.py similarity index 97% rename from src/otter/models/otter/flamingo_pt2otter_hf.py rename to src/otter_ai/models/otter/flamingo_pt2otter_hf.py index 154933d8..c1e7e683 100644 --- a/src/otter/models/otter/flamingo_pt2otter_hf.py +++ b/src/otter_ai/models/otter/flamingo_pt2otter_hf.py @@ -10,7 +10,7 @@ import torch.nn as nn from transformers import CLIPVisionModel, LlamaForCausalLM, LlamaTokenizer -from otter.models.otter.modeling_otter import ( +from otter_ai.models.otter.modeling_otter import ( OtterPreTrainedModel, OtterLMMixin, extend_instance, @@ -18,7 +18,7 @@ OtterPerceiverResampler, ) -from otter.models.otter.configuration_otter import OtterConfig +from otter_ai.models.otter.configuration_otter import OtterConfig class OtterModel(OtterPreTrainedModel): diff --git a/src/otter/models/otter/modeling_otter.py b/src/otter_ai/models/otter/modeling_otter.py similarity index 99% rename from src/otter/models/otter/modeling_otter.py rename to src/otter_ai/models/otter/modeling_otter.py index 5fd16bb6..9a25836a 100755 --- a/src/otter/models/otter/modeling_otter.py +++ b/src/otter_ai/models/otter/modeling_otter.py @@ -9,9 +9,9 @@ from .configuration_otter import OtterConfig -from otter.models.flamingo.falcon.modelling_RW import RWForCausalLM -from otter.models.flamingo.mpt.modeling_mpt import MPTForCausalLM -from otter.models.flamingo.mpt_redpajama.mosaic_gpt import MosaicGPT +from otter_ai.models.flamingo.falcon.modelling_RW import RWForCausalLM +from otter_ai.models.flamingo.mpt.modeling_mpt import MPTForCausalLM +from otter_ai.models.flamingo.mpt_redpajama.mosaic_gpt import MosaicGPT from transformers.models.auto import AutoModel, AutoModelForCausalLM, AutoTokenizer from peft import get_peft_model, LoraConfig, TaskType diff --git a/unittest/test_mmc4_dataset.py b/unittest/test_mmc4_dataset.py index e0d41870..48d4692a 100644 --- a/unittest/test_mmc4_dataset.py +++ b/unittest/test_mmc4_dataset.py @@ -1,6 +1,6 @@ import unittest from unittest.mock import Mock -from otter.pipeline.mimicit_utils.mmc4_dataset import get_mmc4_dataset +from otter_ai.pipeline.mimicit_utils.mmc4_dataset import get_mmc4_dataset class TestGetMMC4Dataset(unittest.TestCase):