rename mini_gpt4.py to minigpt_4.py and remove some unused import

This commit is contained in:
Deyao Zhu 2023-10-12 22:47:48 +03:00
parent 045a1d0602
commit d1367e5e64
3 changed files with 3 additions and 19 deletions

View File

@ -11,7 +11,7 @@ from omegaconf import OmegaConf
from minigpt4.common.registry import registry
from minigpt4.models.base_model import BaseModel
from minigpt4.models.mini_gpt4 import MiniGPT4
from minigpt4.models.minigpt_4 import MiniGPT4
from minigpt4.processors.base_processor import BaseProcessor

View File

@ -6,19 +6,10 @@ from torch.cuda.amp import autocast as autocast
import torch.nn as nn
from minigpt4.common.registry import registry
from minigpt4.models.base_model import BaseModel, disabled_train
from minigpt4.models.base_model import disabled_train
from minigpt4.models.minigpt_base import MiniGPTBase
from minigpt4.models.Qformer import BertConfig, BertLMHeadModel
from transformers.models.llama.modeling_llama import LlamaForCausalLM
from transformers import LlamaTokenizer
from peft import (
LoraConfig,
get_peft_model,
get_peft_model_state_dict,
prepare_model_for_int8_training,
set_peft_model_state_dict,
)
@registry.register_model("mini_gpt4")

View File

@ -6,15 +6,8 @@ from torch.cuda.amp import autocast as autocast
import torch.nn as nn
from minigpt4.common.registry import registry
from minigpt4.models.base_model import BaseModel, disabled_train
from transformers.models.llama.modeling_llama import LlamaForCausalLM
from transformers import LlamaTokenizer
from minigpt4.models.base_model import BaseModel
from peft import (
LoraConfig,
get_peft_model,
prepare_model_for_int8_training,
)
class MiniGPTBase(BaseModel):