Powiadomienia
Wyczyść wszystko
BugOverflow
1
Wpisy
1
Użytkownicy
0
Reactions
2,185
Widoki
0
18/06/2023 9:44 pm
Rozpoczynający temat
how to fix this error
Exception has occurred: 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.
File "/mnt/k/MajorbotData/TraningCommentsModelPara/gpt2.py", line 89, in training_step
loss = self(input_ids, attention_mask, labels)
File "/mnt/k/MajorbotData/TraningCommentsModelPara/gpt2.py", line 73, in forward
outputs = self.model(input_ids, attention_mask=attention_mask, labels=labels)
RuntimeError: CUDA error: device-side assert triggered
1 odpowiedź
0
18/06/2023 9:45 pm
Rozpoczynający temat
In my case that was just changing special token from
tokenizer.add_special_tokens({'pad_token': '[PAD]'})
to
tokenizer.pad_token = tokenizer.eos_token
