Skip to content

Commit 102a080

Browse files
committed
added the import at the top
1 parent 2b65b93 commit 102a080

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

keras_hub/src/models/deepseek_v31/deepseek_v31_attention.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""DeepSeek V31 Multi-head Latent Attention layer."""
22

3+
import math
4+
35
import keras
46
from keras import ops
57

@@ -232,7 +234,6 @@ def _yarn_inv_freq(self, dtype):
232234

233235
# Wavelength = 2π / freq. High-freq → small wavelength, low-freq →
234236
# large wavelength. YaRN applies more scaling to low-freq dimensions.
235-
import math
236237

237238
wavelengths = 2.0 * math.pi / freqs
238239
old_ctx = float(self.yarn_original_max_position_embeddings)

0 commit comments

Comments
 (0)