possible fix for cuda assert error

This commit is contained in:
wassname
2023-10-07 13:51:47 +08:00
parent 99635193f5
commit 6f3d1ec7e5
+1 -1
View File
@@ -92,7 +92,7 @@ class GPT2InferenceModel(GPT2PreTrainedModel):
else:
emb = self.embeddings(input_ids)
emb = emb + self.pos_embedding.get_fixed_embedding(
attention_mask.shape[1] - (prefix_len + 1), attention_mask.device
attention_mask.shape[1] - (prefix_len + 2), attention_mask.device
)
transformer_outputs = self.transformer(
inputs_embeds=emb,