mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Merge pull request #5072 from Anai-Guo/fix/lumina-dimoo-attention-kwargs
fix(lumina): pass to_compute_mask, not use_cache, to LLaDABlock.attention
This commit is contained in:
@@ -874,10 +874,10 @@ class LLaDASequentialBlock(LLaDABlock):
|
||||
|
||||
if self._activation_checkpoint_fn is not None:
|
||||
att, cache = self._activation_checkpoint_fn( # type: ignore
|
||||
self.attention, q, k, v, attention_bias, layer_past=layer_past, use_cache=use_cache
|
||||
self.attention, q, k, v, attention_bias, layer_past=layer_past
|
||||
)
|
||||
else:
|
||||
att, cache = self.attention(q, k, v, attention_bias, layer_past=layer_past, use_cache=use_cache)
|
||||
att, cache = self.attention(q, k, v, attention_bias, layer_past=layer_past)
|
||||
|
||||
x = x + self.dropout(att)
|
||||
|
||||
@@ -967,7 +967,7 @@ class LLaDALlamaBlock(LLaDABlock):
|
||||
|
||||
if self._activation_checkpoint_fn is not None:
|
||||
att, cache = self._activation_checkpoint_fn( # type: ignore
|
||||
self.attention, q, k, v, attention_bias, layer_past=layer_past, use_cache=use_cache
|
||||
self.attention, q, k, v, attention_bias, layer_past=layer_past, to_compute_mask=to_compute_mask
|
||||
)
|
||||
else:
|
||||
att, cache = self.attention(q, k, v, attention_bias, layer_past=layer_past, to_compute_mask=to_compute_mask)
|
||||
|
||||
Reference in New Issue
Block a user