facebookresearch / facebookresearch/blt

demo.py RuntimeError: CUDA error: an illegal memory access was encountered

Open
#136 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.1k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

I set up the repo using Option 1 and downloaded the model using `download_blt_weights.py`. I then ran `demo.py` with the following prompt from the Physical Interaction: Question Answering (PIQA) dataset

```shell
python demo.py "Question: How do you properly prepare a steak.
Answer: Take the steak out of warm storage and let come to room temperature, generously add salt and pepper to both sides and let sit for 10 minutes."
```

and got the error:
```shell
╭────────────────────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────────────────╮ │
[rank0]: │ │ attn_bias_type = 'local_block_causal' │ │
[rank0]: │ │ attn_impl = 'xformers' │ │
[rank0]: │ │ eos_id = 2 │ │
[rank0]: │ │ seqlen = 260 │ │
[rank0]: │ │ sliding_window = 512 │ │
[rank0]: │ │ tokens = │ │
[rank0]: │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
[rank0]: │ │
[rank0]: │ /home/kieron/blt/bytelatent/model/utils.py:116 in tokens_to_seqlen │
[rank0]: │ │
[rank0]: │ 113 │ │
[rank0]: │ 114 │ # 0 0 0 1 0 0 0 1 0 0 X │
[rank0]: │ 115 │ # 0 1 0 0 0 1 0 0 0 0 X │
[rank0]: │ ❱ 116 │ row, col = torch.where(mask) │
[rank0]: │ 117 │ │
[rank0]: │ 118 │ # row = 0, 0, 0, 1, 1, 1 │
[rank0]: │ 119 │ # col = 3, 7, 10, 1, 5, 10 │
[rank0]: │ │
[rank0]: │ ╭────────────────────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────────────────╮ │
[rank0]: │ │ batch = │ │
[rank0]: │ │ eos_id = 2 │ │
[rank0]: │ │ mask = │ │
[rank0]: │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
[rank0]: ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[rank0]: RuntimeError: CUDA error: an illegal memory access was encountered
[rank0]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank0]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1
[rank0]: Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Aborted (core dumped)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.