Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when trying to run instruction_tuning.ipynb #1

Open
kannangce opened this issue Sep 3, 2023 · 0 comments
Open

Issue when trying to run instruction_tuning.ipynb #1

kannangce opened this issue Sep 3, 2023 · 0 comments

Comments

@kannangce
Copy link

I'm trying to run instruction_tuning.ipynb with a custom csv. Though I have't gotten to the part of custom data yet, I'm getting issue in the below code,

model = AutoModelForCausalLM.from_pretrained(
        BASE_MODEL,
        device_map="auto",
        load_in_8bit=True,
        trust_remote_code=True,
    )

The error is,

ImportError Traceback (most recent call last)
in <cell line: 1>()
----> 1 model = AutoModelForCausalLM.from_pretrained(
2 BASE_MODEL,
3 device_map="auto",
4 load_in_8bit=True,
5 trust_remote_code=True,

1 frames
/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py in from_pretrained(cls, pretrained_model_name_or_path, config, cache_dir, ignore_mismatched_sizes, force_download, local_files_only, token, revision, use_safetensors, *model_args, **kwargs)
2399 if load_in_8bit or load_in_4bit:
2400 if not (is_accelerate_available() and is_bitsandbytes_available()):
-> 2401 raise ImportError(
2402 "Using load_in_8bit=True requires Accelerate: pip install accelerate and the latest version of"
2403 " bitsandbytes pip install -i https://test.pypi.org/simple/ bitsandbytes or"

ImportError: Using load_in_8bit=True requires Accelerate: pip install accelerate and the latest version of bitsandbytes pip install -i https://test.pypi.org/simple/ bitsandbytes or pip install bitsandbytes`


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

I have executed the below pip installs and restart the collab.

!pip install  --upgrade transformers
!pip install peft
!pip install datasets
!pip install  --upgrade accelerate
!pip install --upgrade bitsandbytes

Is it known issue? If so any idea on getting it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant