FastChat
FastChat copied to clipboard
cannot import name 'find_layers' from 'modelutils'
Following the instructions to install:
pip3 install --upgrade pip
pip3 install -e .
And then running the model resulted in the following error:
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/bones/build/FastChat/fastchat/serve/cli.py", line 162, in <module>
main(args)
File "/home/bones/build/FastChat/fastchat/serve/cli.py", line 99, in main
from fastchat.serve.load_gptq_model import load_quantized
File "/home/bones/build/FastChat/fastchat/serve/load_gptq_model.py", line 8, in <module>
from modelutils import find_layers
ImportError: cannot import name 'find_layers' from 'modelutils' (/home/bones/.local/lib/python3.10/site-packages/modelutils/__init__.py)
After checking the latest release of modelutils
, it does appear that there is no find_layers
method implemented.
Hi, Include this in the load_gptq_model.py "sys.path.append(*GPTQ-for-LLaMa)" find_layers are from modelutils.py is in GPTQ-for-LLaMa/modelutils.py
That seems to do nothing. I placed the line right above this:
sys.path.insert(0, str(Path("repositories/GPTQ-for-LLaMa")))
I'll note that no GPTQ-for-LLaMa exists on my system anywhere. I even made sure to run updatedb
so locate
was fully up to date. Taking that as a hint, I went to the qwopqwop200/GPTQ-for-LLaMa repository and installed it separately. This seems to have fixed the issue, so perhaps the installation instructions here need a minor revision, or the dependencies should be updated.
Edit: Nope, that didn't do it either. I took the glacially long startup time as success. I'm stumped.
Alright. so I'm dumb. I added the correct path to the repo. Though this is a somewhat unorthodox method.
sys.path.append("/home/bones/build/GPTQ-for-LLaMa")
sys.path.insert(0, str(Path("repositories/GPTQ-for-LLaMa")))
Still, the requirement for GPTQ-for-LLaMa isn't mentioned, and I had to clone and bootstrap it manually.
CODE:- try: from modelutils import find_layers except ImportError: from utils import find_layers
ERROR:- from utils import find_layers ImportError: cannot import name 'find_layers' from 'utils'
PLEASE help me I'm not getting what is the problem, And i'm not getting any resources through out the whole internet
i was trying to install oobabooga and vicuna in my cpu and im getting this error continously, what to do here
Closing this is not related to any feature developed by this repo.