Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions keras_hub/api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@
from keras_hub.src.models.qwen3.qwen3_backbone import (
Qwen3Backbone as Qwen3Backbone,
)
from keras_hub.src.models.qwen3.qwen3_causal_lm import (
Qwen3CausalLM as Qwen3CausalLM,
)
from keras_hub.src.models.qwen3.qwen3_causal_lm_preprocessor import (
Qwen3CausalLMPreprocessor as Qwen3CausalLMPreprocessor,
)
Expand Down
4 changes: 2 additions & 2 deletions keras_hub/src/models/qwen3/qwen3_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ def _compute_attention(
attention_scores,
ops.cast(self._inv_norm_factor, self.compute_dtype),
)
if not self.sliding_window_size:
if self.sliding_window_size:
attention_mask = self._mask_sliding_window(
attention_mask,
cache_update_index=cache_update_index
if cache_update_index
if cache_update_index is not None
else 0,
)
attention_scores = self._masked_softmax(
Expand Down
Loading
Loading