Add Cosmos3 model support (#3454)

Signed-off-by: Maciej Bala <mbala@nvidia.com>
Signed-off-by: MaciejBalaNV <mbala@nvidia.com>
Signed-off-by: lishunyang12 <lishunyang12@163.com>
Co-authored-by: SYLAR <125541396+lishunyang12@users.noreply.github.com>
Co-authored-by: lishunyang12 <lishunyang12@163.com>
This commit is contained in:
authored and GitHub committed 2026-06-02 04:04:31 +08:00
1 parent 2b7249fbb3
commit bc794e625f
29 files changed
+4095 -21

No files matched your search

@@ -51,6 +51,7 @@ class CuDNNAttentionImpl(AttentionImpl):
) -> None:
self.causal = causal
self.softmax_scale = softmax_scale
self.requires_gqa = num_heads != num_kv_heads
def forward_cuda(
self,
@@ -84,6 +85,7 @@ class CuDNNAttentionImpl(AttentionImpl):
dropout_p=0.0,
is_causal=self.causal,
scale=self.softmax_scale,
enable_gqa=self.requires_gqa,
)
except RuntimeError as e:
if "No available kernel" not in str(e):
@@ -100,5 +102,6 @@ class CuDNNAttentionImpl(AttentionImpl):
dropout_p=0.0,
is_causal=self.causal,
scale=self.softmax_scale,
enable_gqa=self.requires_gqa,
)
return output.permute(0, 2, 1, 3)