Skip to content

Commit e767be7

Browse files
committed
T5: Send attention mask to backend (just in case clip_on_cpu is ever disabled)
1 parent 92a9f77 commit e767be7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

t5.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,10 @@ struct T5Runner : public GGMLRunner {
815815

816816
relative_position_bucket_vec = compute_relative_position_bucket(input_ids->ne[0], input_ids->ne[0]);
817817

818+
if(attention_mask){
819+
attention_mask = to_backend(attention_mask);
820+
}
821+
818822
// for (int i = 0; i < relative_position_bucket_vec.size(); i++) {
819823
// if (i % 77 == 0) {
820824
// printf("\n");

0 commit comments

Comments
 (0)