[GH-ISSUE #242] chat Error #146

Open
opened 2026-10-29 14:34:58 +00:00 by bsakaguchi · 11 comments
Owner

Originally created by @Zha-Miku on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/242

detail

nvidia-smi


+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA L40                     On  |   00000000:15:00.0 Off |                    0 |
| N/A   29C    P0             86W /  300W |    6551MiB /  46068MiB |      9%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA L40                     On  |   00000000:18:00.0 Off |                    0 |
| N/A   23C    P8             24W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   2  NVIDIA L40                     On  |   00000000:19:00.0 Off |                    0 |
| N/A   22C    P8             36W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   3  NVIDIA L40                     On  |   00000000:1C:00.0 Off |                    0 |
| N/A   24C    P8             24W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   4  NVIDIA L40                     On  |   00000000:1D:00.0 Off |                    0 |
| N/A   27C    P0             70W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   5  NVIDIA L40                     On  |   00000000:96:00.0 Off |                    0 |
| N/A   25C    P0             71W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   6  NVIDIA L40                     On  |   00000000:99:00.0 Off |                    0 |
| N/A   25C    P0             69W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   7  NVIDIA L40                     On  |   00000000:9A:00.0 Off |                    0 |
| N/A   25C    P0             70W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   8  NVIDIA L40                     On  |   00000000:9D:00.0 Off |                    0 |
| N/A   24C    P0             46W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   9  NVIDIA L40                     On  |   00000000:9E:00.0 Off |                    0 |
| N/A   24C    P0             46W /  300W |       4MiB /  46068MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A         2973245      C   python                                 6542MiB |
+-----------------------------------------------------------------------------------------+

ram


top - 09:04:10 up 1 day, 18:58,  9 users,  load average: 5.13, 3.94, 3.03
Tasks: 1474 total,   5 running, 1469 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3.4 us,  1.4 sy,  0.0 ni, 95.1 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
MiB Mem : 515593.5 total, 107267.3 free,  19094.7 used, 389231.5 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used. 493030.5 avail Mem 

cpu

Intel(R) Xeon(R) Platinum 8338C CPU @ 2.60GHz

Error

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/local_chat.py", line 179, in <module>
    fire.Fire(local_chat)
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 135, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
                                ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/local_chat.py", line 173, in local_chat
    generated = prefill_and_generate(
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 196, in prefill_and_generate
    tokens.append(int(next_token))
                  ^^^^^^^^^^^^^^^
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.


Originally created by @Zha-Miku on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/242 # detail <details><summary>nvidia-smi</summary> <p> ```sh +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.86.15 Driver Version: 570.86.15 CUDA Version: 12.8 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA L40 On | 00000000:15:00.0 Off | 0 | | N/A 29C P0 86W / 300W | 6551MiB / 46068MiB | 9% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 1 NVIDIA L40 On | 00000000:18:00.0 Off | 0 | | N/A 23C P8 24W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 2 NVIDIA L40 On | 00000000:19:00.0 Off | 0 | | N/A 22C P8 36W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 3 NVIDIA L40 On | 00000000:1C:00.0 Off | 0 | | N/A 24C P8 24W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 4 NVIDIA L40 On | 00000000:1D:00.0 Off | 0 | | N/A 27C P0 70W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 5 NVIDIA L40 On | 00000000:96:00.0 Off | 0 | | N/A 25C P0 71W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 6 NVIDIA L40 On | 00000000:99:00.0 Off | 0 | | N/A 25C P0 69W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 7 NVIDIA L40 On | 00000000:9A:00.0 Off | 0 | | N/A 25C P0 70W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 8 NVIDIA L40 On | 00000000:9D:00.0 Off | 0 | | N/A 24C P0 46W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 9 NVIDIA L40 On | 00000000:9E:00.0 Off | 0 | | N/A 24C P0 46W / 300W | 4MiB / 46068MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 2973245 C python 6542MiB | +-----------------------------------------------------------------------------------------+ ``` </p> </details> <details><summary>ram</summary> <p> ```sh top - 09:04:10 up 1 day, 18:58, 9 users, load average: 5.13, 3.94, 3.03 Tasks: 1474 total, 5 running, 1469 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.4 us, 1.4 sy, 0.0 ni, 95.1 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st MiB Mem : 515593.5 total, 107267.3 free, 19094.7 used, 389231.5 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 493030.5 avail Mem ``` </p> </details> ## cpu Intel(R) Xeon(R) Platinum 8338C CPU @ 2.60GHz # Error ```sh Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/local_chat.py", line 179, in <module> fire.Fire(local_chat) File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 135, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 468, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/local_chat.py", line 173, in local_chat generated = prefill_and_generate( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/ktransformers/lib/python3.11/site-packages/ktransformers/util/utils.py", line 196, in prefill_and_generate tokens.append(int(next_token)) ^^^^^^^^^^^^^^^ RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. ```
Author
Owner

@Zha-Miku commented on GitHub (Feb 14, 2025):

new error

Chat: hi
Okay, the /pytorch/aten/src/ATen/native/cuda/TensorCompare.cu:110: _assert_async_cuda_kernel: block: [0,0,0], thread: [0,0,0] Assertion `probability tensor contains either `inf`, `nan` or element < 0` failed.
<!-- gh-comment-id:2658056486 --> @Zha-Miku commented on GitHub (Feb 14, 2025): # new error ```sh Chat: hi Okay, the /pytorch/aten/src/ATen/native/cuda/TensorCompare.cu:110: _assert_async_cuda_kernel: block: [0,0,0], thread: [0,0,0] Assertion `probability tensor contains either `inf`, `nan` or element < 0` failed. ```
Author
Owner

@xialang2012 commented on GitHub (Feb 16, 2025):

解决了吗

<!-- gh-comment-id:2661441300 --> @xialang2012 commented on GitHub (Feb 16, 2025): 解决了吗
Author
Owner

@newstargo commented on GitHub (Feb 16, 2025):

+1

<!-- gh-comment-id:2661678015 --> @newstargo commented on GitHub (Feb 16, 2025): +1
Author
Owner

@wangfan008 commented on GitHub (Feb 18, 2025):

+1

<!-- gh-comment-id:2665858464 --> @wangfan008 commented on GitHub (Feb 18, 2025): +1
Author
Owner

@chuangzhidan commented on GitHub (Feb 19, 2025):

+1

<!-- gh-comment-id:2669203508 --> @chuangzhidan commented on GitHub (Feb 19, 2025): +1
Author
Owner

@konghr commented on GitHub (Feb 20, 2025):

+1

<!-- gh-comment-id:2671441602 --> @konghr commented on GitHub (Feb 20, 2025): +1
Author
Owner

@CmyLjj commented on GitHub (Feb 21, 2025):

how to deal with ?

<!-- gh-comment-id:2673453421 --> @CmyLjj commented on GitHub (Feb 21, 2025): how to deal with ?
Author
Owner

@xieqihui commented on GitHub (Mar 5, 2025):

+1

<!-- gh-comment-id:2700498129 --> @xieqihui commented on GitHub (Mar 5, 2025): +1
Author
Owner

@xxchen86 commented on GitHub (Mar 10, 2025):

+1

<!-- gh-comment-id:2709577204 --> @xxchen86 commented on GitHub (Mar 10, 2025): +1
Author
Owner

@Print1n commented on GitHub (Mar 10, 2025):

+1

<!-- gh-comment-id:2712043625 --> @Print1n commented on GitHub (Mar 10, 2025): +1
Author
Owner

@tunantu commented on GitHub (Mar 14, 2025):

+1

<!-- gh-comment-id:2723757597 --> @tunantu commented on GitHub (Mar 14, 2025): +1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#146
No description provided.