haotian-liu / LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.
https://llava.hliu.cc
Apache License 2.0
19.6k stars 2.16k forks source link

[Question] Why apply the causal mask to image tokens in the attention operations of LLM? #1529

Open yubin1219 opened 4 months ago

yubin1219 commented 4 months ago

Question

In the attention operations of the LLM, text tokens must use the causal mask to predict the next text tokens for the answer. However, the image features are also masked by a causal mask rather than by a bidirectional mask in the attention operations of the LLM, even though the bidirectional mask allows access to more visual information than the causal mask. Is there a particular reason for this making?

Yebulabula commented 3 months ago

I have the same question.