You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Meta just released there LLaMA model family https://github.com/facebookresearch/llama
Can we got support for that?
They calim that the 13B model is better than GPT 3 175B model
Of course, the weights themselves are closed. But the code from the repository should be enough to add support. And where the end users will download the weights from is their problem.
Reacted by strobie, Andrew, Φφ, happytree09 and Mrroot3r
I get a bunch of dependency errors when launching despite setting up LLaMa beforehand (definitely my own fault and probably because of a messed up conda environment)
ModuleNotFoundError: No module named 'fire'
ModuleNotFoundError: No module named 'fairscale'
etc. Any chance you could include these in the default webui requirements assuming they aren't too heavy?
Yeah, after a bit of a struggle I ended up getting it working by just copying all the dependencies into the webui folder. So far the model is really interesting. Thanks for supporting it.
Awesome stuff. I'm able to load LLaMA-7b but trying to load LLaMA-13b crashes with the error:
Traceback (most recent call last):
File "/home/user/Documents/oobabooga/text-generation-webui/server.py", line 189, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/home/user/Documents/oobabooga/text-generation-webui/modules/models.py", line 94, in load_model
model = LLaMAModel.from_pretrained(Path(f'models/{model_name}'))
File "/home/user/Documents/oobabooga/text-generation-webui/modules/LLaMA.py", line 82, in from_pretrained
generator = load(
File "/home/user/Documents/oobabooga/text-generation-webui/modules/LLaMA.py", line 44, in load
assert world_size == len(
AssertionError: Loading a checkpoint for MP=2 but world size is 1
Does anyone have a guess as to what may be causing this error?
I'm in a Ubuntu subsystem in Windows 10. I've tried reinstalling the requirements and restarting the PC. Searching on google returns no relevant results.
Loading llama-7b-hf...
Traceback (most recent call last):
File "/home/[user]/text-generation-webui/server.py", line 241, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/home/[user]/text-generation-webui/modules/models.py", line 101, in load_model
model = load_quantized(model_name)
File "/home/[user]/text-generation-webui/modules/GPTQ_loader.py", line 55, in load_quantized
model = load_quant(str(path_to_model), str(pt_path), shared.args.gptq_bits)
TypeError: load_quant() missing 1 required positional argument: 'groupsize'
does anybody know where i should start to go about fixing the below errors? running on a m1 max 64gb.
Attempted with HFv2 Model Weights LLaMA-7B
python server.py --model LLaMA-7B --load-in-8bit --no-stream
Loading LLaMA-7B...
===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
dlopen(/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so, 0x0006): tried: '/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file)
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
dlopen(/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so, 0x0006): tried: '/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file)
/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/bitsandbytes/cextension.py:31: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
Traceback (most recent call last):
File "/Users/username/text-generation-webui/server.py", line 241, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/Users/username/text-generation-webui/modules/models.py", line 159, in load_model
model = AutoModelForCausalLM.from_pretrained(checkpoint, **params)
File "/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "/opt/homebrew/Caskroom/miniconda/base/envs/textgen/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2588, in from_pretrained
raise ValueError(
ValueError:
Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit
the quantized model. If you want to dispatch the model on the CPU or the disk while keeping
these modules in 32-bit, you need to set `load_in_8bit_fp32_cpu_offload=True` and pass a custom
`device_map` to `from_pretrained`. Check
https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu
for more details.
I've been following this tutorial trying to set up llama 7b and eventually 13b, and I'm running into an issue I can't find referenced anywhere online regarding the process, pasted below.
I'm running Windows 10, and I've already attempted the fix detailed HERE. I've tried running the command in Anaconda Prompt (miniconda3) both normally and as an administrator, and I get the same error. I even tried running it in normal CMD which didn't lead anywhere.
Let me know if I'm posting this in the wrong place, formatting incorrectly, or committing some other faux pas - I can't figure out how to do this clean looking 'snippet clipboard content' formatting that people are using here.
(base) D:\AI Image Things\text-generation-webui>python server.py --cai-chat --wbits 4 --model llama-7b-hf --no-stream
Traceback (most recent call last):
File "D:\AI Image Things\text-generation-webui\server.py", line 13, in
from modules import chat, shared, training, ui
File "D:\AI Image Things\text-generation-webui\modules\training.py", line 11, in
from peft import (LoraConfig, get_peft_model, get_peft_model_state_dict,
File "C:\Users\J\miniconda3\lib\site-packages\peft_init_.py", line 22, in
from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING, PEFT_TYPE_TO_CONFIG_MAPPING, get_peft_config, get_peft_model
File "C:\Users\J\miniconda3\lib\site-packages\peft\mapping.py", line 16, in
from .peft_model import (
File "C:\Users\J\miniconda3\lib\site-packages\peft\peft_model.py", line 31, in
from .tuners import LoraModel, PrefixEncoder, PromptEmbedding, PromptEncoder
File "C:\Users\J\miniconda3\lib\site-packages\peft\tuners_init_.py", line 20, in
from .lora import LoraConfig, LoraModel
File "C:\Users\J\miniconda3\lib\site-packages\peft\tuners\lora.py", line 36, in
import bitsandbytes as bnb
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes_init_.py", line 7, in
from .autograd.functions import (
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes\autograd_init.py", line 1, in
from ._functions import undo_layout, get_inverse_transform_indices
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes\autograd_functions.py", line 9, in
import bitsandbytes.functional as F
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes\functional.py", line 17, in
from .cextension import COMPILED_WITH_CUDA, lib
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes\cextension.py", line 8, in
from bitsandbytes.cuda_setup.main import CUDASetup
File "C:\Users\J\miniconda3\lib\site-packages\bitsandbytes\cuda_setup\main.py", line 368
if torch.cuda.is_available(): return 'libbitsandbytes_cuda116.dll', None, None, None, None
^
IndentationError: unindent does not match any outer indentation level
@guruace HOW? I don't understand, what I am doing wrong. I get the following error.
===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
================================================================================
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
dlopen(/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so, 0x0006): tried: '/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (no such file), '/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file)
CUDA SETUP: Required library version not found: libsbitsandbytes_cpu.so. Maybe you need to compile it from source?
CUDA SETUP: Defaulting to libbitsandbytes_cpu.so...
dlopen(/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so, 0x0006): tried: '/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (no such file), '/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so' (not a mach-o file)
/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/bitsandbytes/cextension.py:31: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
Loading 13B-conv...
Traceback (most recent call last):
File "/Users/hanke/src/text-generation-webui/server.py", line 273, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "/Users/hanke/src/text-generation-webui/modules/models.py", line 49, in load_model
model = AutoModelForCausalLM.from_pretrained(Path(f"{shared.args.model_dir}/{shared.model_name}"), device_map='auto', load_in_8bit=True)
File "/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "/Users/hanke/src/text-generation-webui/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2601, in from_pretrained
raise ValueError(
ValueError:
Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit
the quantized model. If you want to dispatch the model on the CPU or the disk while keeping
these modules in 32-bit, you need to set `load_in_8bit_fp32_cpu_offload=True` and pass a custom
`device_map` to `from_pretrained`. Check
https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu
for more details.
When running python server.py --auto-launch --model 13B
I dont know, why it is trying to use cuda, when MPS should automatically be chosen? But I also just dont get the workflow of the program yet... Maybe you can give me some pointers, on how I might fix that?
Thanks!
File "/home/yinan/text-generation-webui/modules/text_generation.py", line 31, in encode
input_ids = shared.tokenizer.encode(str(prompt), return_tensors='pt', add_special_tokens=add_special_tokens)
AttributeError: 'NoneType' object has no attribute 'encode'
Activity
oobabooga commentedon Feb 27, 2023
The models are not public yet, unfortunately. You have to request access.
MetaIX commentedon Mar 2, 2023
Psst. Somebody leaked them https://twitter.com/Teknium1/status/1631322496388722689
Sumanai commentedon Mar 2, 2023
Of course, the weights themselves are closed. But the code from the repository should be enough to add support. And where the end users will download the weights from is their problem.
catboxanon commentedon Mar 3, 2023
meta-llama/llama#73
oobabooga commentedon Mar 3, 2023
Done ea5c5eb
Put the model that you downloaded using your academic credentials on
models/LLaMA-7B(the folder name must start with llama)Put a copy of the files inside that folder too:
tokenizer.modelandtokenizer_checklist.chkStart the web ui. I have tested with
moorehousew commentedon Mar 3, 2023
Getting a CUDA out-of-memory error- I assume lowmem support isn't included yet?
oobabooga commentedon Mar 3, 2023
This isn't part of Hugging Face yet, so it doesn't have access to 8bit and CPU offloading.
The 7B model uses 14963MiB VRAM on my machine. Reducing the max_seq_len parameter from 2048 to 512 makes this go down to 13843MiB.
musicurgy commentedon Mar 4, 2023
I get a bunch of dependency errors when launching despite setting up LLaMa beforehand (definitely my own fault and probably because of a messed up conda environment)
etc. Any chance you could include these in the default webui requirements assuming they aren't too heavy?
oobabooga commentedon Mar 4, 2023
@musicurgy did you try
pip install -r requirements.txtas in #147 (comment)?musicurgy commentedon Mar 4, 2023
Yeah, after a bit of a struggle I ended up getting it working by just copying all the dependencies into the webui folder. So far the model is really interesting. Thanks for supporting it.
generic-username0718 commentedon Mar 4, 2023
Awesome stuff. I'm able to load LLaMA-7b but trying to load LLaMA-13b crashes with the error:
generic-username0718 commentedon Mar 4, 2023
Anyone reading this you can get past the issue above by changing the world_size variable found in modules/LLaMA.py like this:
def setup_model_parallel() -> Tuple[int, int]:
local_rank = int(os.environ.get("LOCAL_RANK", -1))
world_size = 2
My issue now is I'm running out of VRAM. I'm running dual 3090s and should be able to load the model if it's split among the cards...
generic-username0718 commentedon Mar 4, 2023
Is there a parameter I need to pass to oobabooga to tell it to split the model among my two 3090 gpus?
Morb0 commentedon Mar 4, 2023
Try
--gpu-memory 10 5, at least that's what the README says.275 remaining items
f8upd8 commentedon Mar 17, 2023
This helped, thank you
echo-lalia commentedon Mar 20, 2023
Does anyone have a guess as to what may be causing this error?
I'm in a Ubuntu subsystem in Windows 10. I've tried reinstalling the requirements and restarting the PC. Searching on google returns no relevant results.
oobabooga commentedon Mar 20, 2023
See #445 (comment)
dipaloka commentedon Mar 22, 2023
does anybody know where i should start to go about fixing the below errors? running on a m1 max 64gb.
Attempted with HFv2 Model Weights LLaMA-7B
oobabooga commentedon Mar 22, 2023
It looks like you don't have enough memory to load the model. Try adding
(adjust the value based on your GPU size)
ye7iaserag commentedon Mar 25, 2023
@oobabooga there is a wrapper for llama.cpp now
Check this out https://github.com/PotatoSpudowski/fastLLaMa
JoshuaMBlaz commentedon Mar 30, 2023
I've been following this tutorial trying to set up llama 7b and eventually 13b, and I'm running into an issue I can't find referenced anywhere online regarding the process, pasted below.
I'm running Windows 10, and I've already attempted the fix detailed HERE. I've tried running the command in Anaconda Prompt (miniconda3) both normally and as an administrator, and I get the same error. I even tried running it in normal CMD which didn't lead anywhere.
Let me know if I'm posting this in the wrong place, formatting incorrectly, or committing some other faux pas - I can't figure out how to do this clean looking 'snippet clipboard content' formatting that people are using here.
(base) D:\AI Image Things\text-generation-webui>
oobabooga commentedon Mar 30, 2023
I recommend using the new one-click installer for native Windows installation
https://github.com/oobabooga/text-generation-webui#one-click-installers
JoshuaMBlaz commentedon Mar 30, 2023
I'll give that a shot! Thanks for the work you put in on all this - the accessibility of this wave of AI tech is seriously appreciated.
tillhanke commentedon Mar 31, 2023
@guruace HOW? I don't understand, what I am doing wrong. I get the following error.
When running
python server.py --auto-launch --model 13BI dont know, why it is trying to use cuda, when MPS should automatically be chosen? But I also just dont get the workflow of the program yet... Maybe you can give me some pointers, on how I might fix that?
Thanks!
oobabooga commentedon Mar 31, 2023
@tillhanke this is an out of memory error. It means that not enough RAM and/or VRAM was found in the system to load the model.
neuhaus commentedon Apr 11, 2023
so, Llama works, i guess this issue can be closed 👏🏼
Modplay commentedon Apr 14, 2023
File "/home/yinan/text-generation-webui/modules/text_generation.py", line 31, in encode
input_ids = shared.tokenizer.encode(str(prompt), return_tensors='pt', add_special_tokens=add_special_tokens)
AttributeError: 'NoneType' object has no attribute 'encode'
xNul commentedon Apr 14, 2023
@Modplay you haven't downloaded or set the model yet