Leres, dua operasi PyTorch ieu sami. Operasi munggaran "torch.bmm(attention_slice, value) " ngagunakeun fungsi matriks batch (bmm) ti PyTorch. Éta ngalaksanakeun perkalian matriks dina dua tensor dimana tensor munggaran diubaran salaku batch matriks, kalayan unggal matriks dikali ku tensor kadua. Tensor hasilna ngagaduhan bentuk (batch_size, attention_slice.shape[1], value.shape[2]). Operasi kadua "(um'b i j, b j -> b i d', attention_slice, value) " nganggo fungsi PyTorch einsum, anu ngalaksanakeun operasi summation dina dua tensor. Argumen string tensor "b j, b j d b i d" nunjukkeun yén dua indikator perhatian anu kalibet dina ngitung sareng hasilna sami sareng hasilna sami.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence