[Model] fix model testing for TeleChat2ForCausalLM and V0 llama4 (#16112)

Signed-off-by: Lu Fang <fanglu@fb.com>
This commit is contained in:
Lucia Fang
2025-04-05 21:23:40 -07:00
committed by GitHub
parent 29283eaa7e
commit 620fc2d09e
2 changed files with 11 additions and 2 deletions
+5
View File
@@ -617,10 +617,15 @@ class FlashAttentionImpl(AttentionImpl):
blocksparse_params: Optional[Dict[str, Any]] = None,
logits_soft_cap: Optional[float] = None,
attn_type: str = AttentionType.DECODER,
use_irope: bool = False,
) -> None:
if blocksparse_params is not None:
raise ValueError(
"FlashAttention does not support block-sparse attention.")
if use_irope:
logger.warning(
"Using irope in V0 is not supported yet, it will fall back "
"to global attention for long context.")
self.num_heads = num_heads
self.head_size = head_size
self.scale = float(scale)