English

ImportError with default dependencies installation

#3
by Laz4rz - opened

Tried on both python 3.11 and 3.12

Run:

pip install torch transformers bitsandbytes accelerate
pip install pillow
python __main__.py -I file.png

results in:

Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Traceback (most recent call last):
  File "/Users/mikolajboronski/github/minecraft/llama-3-vision-alpha/__main__.py", line 209, in <module>
    tokenizer, model, vision_model, processor = initialize_models()
                                                ^^^^^^^^^^^^^^^^^^^
  File "/Users/mikolajboronski/github/minecraft/llama-3-vision-alpha/__main__.py", line 64, in initialize_models
    model = LlamaForCausalLM.from_pretrained(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mikolajboronski/miniconda3/envs/mc/lib/python3.11/site-packages/transformers/modeling_utils.py", line 3165, in from_pretrained
    hf_quantizer.validate_environment(
  File "/Users/mikolajboronski/miniconda3/envs/mc/lib/python3.11/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`

Tried reinstalling both accelerate and bitsandbytes -- didnt help. Can you please provide a requirements.txt so I can try with hardcoded versions?

qresearch org

fixed with requirements.txt

qtnx changed discussion status to closed

same problem even with requirements.txt, tried python 3.8, 3.9, 3.10, 3.11, 3.12 in conda environments
(╮°-°)╮┳━━┳ ( ╯°□°)╯ ┻━━┻
like completely identical traceback dude

qresearch org

are you running on macos or linux? i've heard it's a mac issue

Sign up or log in to comment