lm-sys / lm-sys/FastChat

AssertionError: Torch not compiled with CUDA enabled

Open
#2,344 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

(base) jetson@SSD:~/FastChat/FastChat$ python3 -m fastchat.serve.cli --model-path lmsys/fastchat-t5-3b-v1.0
You are using the legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This means that tokens that come after special tokens will not be properly handled. We recommend you to read the related pull request available at https://github.com/huggingface/transformers/pull/24565
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/jetson/FastChat/FastChat/fastchat/serve/cli.py", line 280, in
main(args)
File "/home/jetson/FastChat/FastChat/fastchat/serve/cli.py", line 206, in main
chat_loop(
File "/home/jetson/FastChat/FastChat/fastchat/serve/inference.py", line 307, in chat_loop
model, tokenizer = load_model(
^^^^^^^^^^^
File "/home/jetson/FastChat/FastChat/fastchat/model/model_adapter.py", line 291, in load_model
model.to(device)
File "/home/jetson/miniconda3/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1900, in to
return super().to(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jetson/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1145, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/home/jetson/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 797, in _apply
module._apply(fn)
File "/home/jetson/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 820, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/home/jetson/miniconda3/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1143, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jetson/miniconda3/lib/python3.11/site-packages/torch/cuda/init.py", line 239, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported command and traceback, then inspect fastchat/serve/cli.py, fastchat/serve/inference.py, and fastchat/model/model_adapter.py around device selection and model.to(device). Reproduce the failure in the reported environment and determine the supported device configuration. Done should mean the cause is resolved or the CLI gives a clear response when CUDA is unavailable, with a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.