ImportError: Diese Modellierungsdatei erfordert die folgenden Pakete, die in Ihrer Umgebung nicht gefunden wurden: peft. Führen Sie pip install peft aus
Aber meine „Pip-Liste“ aus der Umgebung zeigt, dass peft installiert ist.
Code: Select all
env$ pip list | grep peft
peft 0.14.0**
Code: Select all
model = AutoModel.from_pretrained(
path,
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
trust_remote_code=True).eval().cuda()
Code: Select all
Traceback (most recent call last):
File "/home/expert/chemvlm26/vlm26.py", line 104, in
model = AutoModel.from_pretrained(
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 553, in from_pretrained
model_class = get_class_from_dynamic_module(\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 488, in get_class_from_dynamic_modul
e
final_module = get_cached_module_file(\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 315, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 180, in check_imports
raise ImportError(\
ImportError: This modeling file requires the following packages that were not found in your environment: peft. Run `pip install peft`