I’m sorry I haven’t replied to this yet. I got sidetracked with other problems. I’ll will investigate this in the next few days. One thing I noticed, though, is that dividing 8160 (tensor a) by 16 (tensor b) I get exactly 510, which is the max_length I set on the tokenizer. So I assume I must be passing the entire batch as one tensor.