Skip to content

Commit a2deb0d

Browse files
committed
make training false on all build methods
1 parent e2f194a commit a2deb0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

keras_hub/src/models/smollm3/smollm3_layers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def build(self, input_shape):
9494
self.k_proj.build(hidden_states_shape)
9595
self.v_proj.build(hidden_states_shape)
9696
self.o_proj.build(hidden_states_shape)
97+
self.training = False
9798
super().build(input_shape)
9899

99100
def call(
@@ -276,6 +277,7 @@ def build(self, input_shape):
276277
self.intermediate_size,
277278
)
278279
self.down_proj.build(down_proj_input_shape)
280+
self.training = False
279281
super().build(input_shape)
280282

281283
def call(self, x):
@@ -397,6 +399,7 @@ def build(self, input_shape):
397399
self.mlp.build(input_shape)
398400
self.input_layernorm.build(input_shape)
399401
self.post_attention_layernorm.build(input_shape)
402+
self.training = False
400403

401404
super().build(input_shape)
402405

@@ -515,6 +518,7 @@ def build(self, input_shape):
515518
- position_ids_shape: (batch_size, seq_len)
516519
"""
517520
# No internal layers to explicitly build here, as inv_freq is added in __init__
521+
self.training = False
518522
super().build(input_shape)
519523

520524
def call(

0 commit comments

Comments
 (0)