diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de6bd7a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/model/__pycache__ +/dataset +/out \ No newline at end of file diff --git a/README.md b/README.md index 1e1c702..bb0cae8 100644 --- a/README.md +++ b/README.md @@ -120,10 +120,8 @@ git clone https://www.modelscope.cn/models/openai-mirror/clip-vit-base-patch16 ``` ```bash -# 下载纯语言模型权重到 ./out 目录下(作为训练VLM的基座语言模型) -https://huggingface.co/jingyaogong/MiniMind2-V-PyTorch/blob/main/lm_512.pth -# or -https://huggingface.co/jingyaogong/MiniMind2-V-PyTorch/blob/main/lm_768.pth +# 下载纯语言模型权重到 ./ 目录下(作为训练VLM的基座语言模型) +git clone https://huggingface.co/jingyaogong/MiniMind2-V ``` ## Ⅰ 测试已有模型效果 diff --git a/README_en.md b/README_en.md index 7176c3e..81da36e 100644 --- a/README_en.md +++ b/README_en.md @@ -127,10 +127,8 @@ git clone https://www.modelscope.cn/models/openai-mirror/clip-vit-base-patch16 ``` ```bash -# Download the pure language model to the ./out directory (as the base language model for training VLM): -https://huggingface.co/jingyaogong/MiniMind2-V-PyTorch/blob/main/lm_512.pth -# or -https://huggingface.co/jingyaogong/MiniMind2-V-PyTorch/blob/main/lm_768.pth +# Download the pure language model to the ./ directory (as the base language model for training VLM): +git clone https://huggingface.co/jingyaogong/MiniMind2-V ``` diff --git a/eval_vlm.py b/eval_vlm.py index 631fbb0..e24426b 100644 --- a/eval_vlm.py +++ b/eval_vlm.py @@ -25,7 +25,7 @@ def init_model(lm_config, device): state_dict = torch.load(ckp, map_location=device) model.load_state_dict({k: v for k, v in state_dict.items() if 'mask' not in k}, strict=False) else: - transformers_model_path = 'MiniMind2-Small-V' + transformers_model_path = 'MiniMind2-V' tokenizer = AutoTokenizer.from_pretrained(transformers_model_path) model = AutoModelForCausalLM.from_pretrained(transformers_model_path, trust_remote_code=True) model.vision_encoder, model.processor = MiniMindVLM.get_vision_model("./model/vision_model/clip-vit-base-patch16")