text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Error using LLaVA on Mac M1, MPS not supported?

Open edwios opened this issue 1 year ago • 0 comments

Describe the bug

An error "No module named 'llama_inference_offload' occurred when starting server.py.

If there doesn't exist a non-CUDA model, then this feature should be documented as not supported on Mac M1/M2. Otherwise, documentation is needed for Mac installations.

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

python download-model.py wojtab/llava-13b-v0-4bit-128g
python3 server.py --model wojtab_llava-13b-v0-4bit-128g --chat  --extensions llava

Screenshot

No response

Logs

[soro:/Users … ment/ml/pytorch/text-generation-webui] [pytorch-m1] main(+0/-1)+* 16d17h44m9s ± python download-model.py wojtab/llava-13b-v0-4bit-128g
Downloading the model to models/wojtab_llava-13b-v0-4bit-128g
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 631   /631    105kiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 88.0  /88.0   13.6kiB/s
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 754   /754    162kiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 137   /137    24.5kiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 7.45G /7.45G  59.8MiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 33.6k /33.6k  4.14MiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 97.0  /97.0   56.7kiB/s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 500k  /500k   11.8MiB/s
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 244   /244    118kiB/s
[soro:/Users … ment/ml/pytorch/text-generation-webui] [pytorch-m1] main(+0/-1)+* 16d17h47m33s ± python3 server.py --model wojtab_llava-13b-v0-4bit-128g --chat  --extensions llava
Gradio HTTP request redirected to localhost :)
bin /Users/soro/miniforge3/envs/pytorch-m1/lib/python3.9/site-packages/bitsandbytes/libbitsandbytes_cpu.so
/Users/soro/miniforge3/envs/pytorch-m1/lib/python3.9/site-packages/bitsandbytes/cextension.py:33: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
  warn("The installed version of bitsandbytes was compiled without GPU support. "
Loading settings from settings.json...
Loading wojtab_llava-13b-v0-4bit-128g...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│                                                                                                  │
│ /Users/Shared/Development/ml/pytorch/text-generation-webui/server.py:914 in <module>             │
│                                                                                                  │
│   911 │   │   update_model_parameters(model_settings, initial=True)  # hijacking the command-l   │
│   912 │   │                                                                                      │
│   913 │   │   # Load the model                                                                   │
│ ❱ 914 │   │   shared.model, shared.tokenizer = load_model(shared.model_name)                     │
│   915 │   │   if shared.args.lora:                                                               │
│   916 │   │   │   add_lora_to_model([shared.args.lora])                                          │
│   917                                                                                            │
│ /Users/Shared/Development/ml/pytorch/text-generation-webui/modules/models.py:148 in load_model   │
│                                                                                                  │
│   145 │   │                                                                                      │
│   146 │   │   # No monkey patch                                                                  │
│   147 │   │   else:                                                                              │
│ ❱ 148 │   │   │   from modules.GPTQ_loader import load_quantized                                 │
│   149 │   │   │                                                                                  │
│   150 │   │   │   model = load_quantized(model_name)                                             │
│   151                                                                                            │
│                                                                                                  │
│ /Users/Shared/Development/ml/pytorch/text-generation-webui/modules/GPTQ_loader.py:14 in <module> │
│                                                                                                  │
│    11 import modules.shared as shared                                                            │
│    12                                                                                            │
│    13 sys.path.insert(0, str(Path("repositories/GPTQ-for-LLaMa")))                               │
│ ❱  14 import llama_inference_offload                                                             │
│    15                                                                                            │
│    16 try:                                                                                       │
│    17 │   from modelutils import find_layers                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'llama_inference_offload'
[soro:/Users … ment/ml/pytorch/text-generation-webui] [pytorch-m1] main(+0/-1)+* 16d17h47m59s 1 ±

System Info

Mac M1 Max 64GB RAM, Mac OS 13.3.1

edwios avatar Apr 25 '23 07:04 edwios