Where can I download the model file manually?
Where can I download the model file manually? Because automatic downloads always time out. Thank you!
(MiniCPMV) PS C:\work\github\MiniCPM-V> python web_demo_2.5.py --device cuda
C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
Traceback (most recent call last):
File "C:\work\github\MiniCPM-V\web_demo_2.5.py", line 33, in <module>
model = AutoModel.from_pretrained(model_path, trust_remote_code=True)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\models\auto\auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\modeling_utils.py", line 3155, in from_pretrained
config.quantization_config = AutoHfQuantizer.merge_quantization_configs(
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\quantizers\auto.py", line 149, in merge_quantization_configs
quantization_config = AutoQuantizationConfig.from_dict(quantization_config)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\quantizers\auto.py", line 79, in from_dict
return target_cls.from_dict(quantization_config_dict)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\utils\quantization_config.py", line 94, in from_dict
config = cls(**config_dict)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\utils\quantization_config.py", line 284, in __init__
self.post_init()
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\utils\quantization_config.py", line 342, in post_init
if self.load_in_4bit and not version.parse(importlib.metadata.version("bitsandbytes")) >= version.parse(
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\importlib\metadata\__init__.py", line 996, in version
return distribution(distribution_name).version
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\importlib\metadata\__init__.py", line 969, in distribution
return Distribution.from_name(distribution_name)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\importlib\metadata\__init__.py", line 548, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for bitsandbytes
Based on the error message, the issue lies in the bitsandbytes package not being properly installed or found. You can try the following steps to resolve this issue:
-
Ensure
bitsandbytesis installed: Install thebitsandbytespackage in your Anaconda environment. You can use the following command to install it:conda install -c conda-forge bitsandbytes
Based on the error message, the issue lies in the
bitsandbytespackage not being properly installed or found. You can try the following steps to resolve this issue:
- Ensure
bitsandbytesis installed: Install thebitsandbytespackage in your Anaconda environment. You can use the following command to install it:conda install -c conda-forge bitsandbytes
Thank you! The sad thing is that I have a new problem. I don't know why.
(MiniCPMV) PS C:\work\github\MiniCPM-V> python web_demo_2.5.py --device cuda
C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
Traceback (most recent call last):
File "C:\work\github\MiniCPM-V\web_demo_2.5.py", line 33, in <module>
model = AutoModel.from_pretrained(model_path, trust_remote_code=True)
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\models\auto\auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\modeling_utils.py", line 3165, in from_pretrained
hf_quantizer.validate_environment(
File "C:\Users\Administrator\anaconda3\envs\MiniCPMV\lib\site-packages\transformers\quantizers\quantizer_bnb_4bit.py", line 62, in validate_environment
raise ImportError(
ImportError: Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`
that means you do not install all python env for minicpm-v
this will make that error disappear, but can't warranties do not have other error.
conda activate MiniCPMV
pip install -i https://pypi.org/simple/ bitsandbytes
pip install accelerate
You can reference this for further guidance ~ https://github.com/OpenBMB/MiniCPM-V?tab=readme-ov-file#install