Skip to content

Cant find libcudart.so #15

@SirWaffle

Description

@SirWaffle

I am running on windows, using miniconda3 and python 3.9.

I have cudatoolkit, cudnn, pytorch, transformers, accelerate, bitsandbytes, and dependencies installed via conda.

when attempting to run a simple test script:

from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers import BloomModel, BloomConfig
from transformers import BloomTokenizerFast, BloomForCausalLM
from transformers import BloomForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("E:/MLModels/bloom")
model = BloomForCausalLM.from_pretrained("E:/MLModels/bloom", device_map="auto", load_in_8bit=True)

prompt = "It was a dark and stormy night"
result_length = 50
inputs = tokenizer(prompt, return_tensors="pt")

tokenout = model.generate(inputs["input_ids"], max_length=result_length)

I see this error when running from a vscode session:

Exception has occurred: RuntimeError
Failed to import transformers.models.bloom.modeling_bloom because of the following error (look up to see its traceback):
argument of type 'WindowsPath' is not iterable

and this output:

WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('C'), WindowsPath('/ProgramData/Miniconda3/envs/llm/lib')}
C:\ProgramData\Miniconda3\envs\llm\lib\site-packages\bitsandbytes\cuda_setup\paths.py:97: UserWarning: C:\ProgramData\Miniconda3\envs\llm did not contain libcudart.so as expected! Searching further paths...
  warn(
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching /usr/local/cuda/lib64...
WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
WARNING: No libcudart.so found! Install CUDA or the cudatoolkit package (anaconda)!   
CUDA SETUP: Loading binary C:\ProgramData\Miniconda3\envs\llm\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so...

I see that its searching for libcudart.so, which is non-existent on my machine.

Is this file supposed to exist in windows? Or do I need to do some trickery to get this working on windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions