Leon4gr45 commited on
Commit
302a3ec
·
verified ·
1 Parent(s): f3a62ee

Create download_model.py

Browse files
Files changed (1) hide show
  1. download_model.py +11 -0
download_model.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # download_model.py
2
+ import torch
3
+ from transformers import AutoModel, AutoTokenizer
4
+
5
+ model_id = "OpenGVLab/InternVL2_5-2B"
6
+
7
+ print(f"Downloading {model_id}...")
8
+ # Download model and tokenizer to the default cache directory
9
+ model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
10
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
11
+ print("Download complete.")