Pooling implementation is weird

#47
by ir2718 - opened

Hi,

I'm interested in your implementation of checking for left padding. Isn't this incorrect in the case all the inputs are of equal length for right side padding?

    left_padding = (attention_mask[:, -1].sum() == attention_mask.shape[0])

This is much easier to check using the tokenizer:

tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6-Embedding")
print(tok.padding_side)  # "right"

Sign up or log in to comment