Yuchan commited on
Commit
4423448
ยท
verified ยท
1 Parent(s): e98f8e8

Update Model.py

Browse files
Files changed (1) hide show
  1. Model.py +2 -2
Model.py CHANGED
@@ -103,7 +103,7 @@ def txt_stream(file_path, num_lines=None):
103
 
104
  # Dataset ์ƒ์„ฑ (์˜ˆ: ์ฒ˜์Œ 10,000๋ผ์ธ๋งŒ)
105
  dataset = tf.data.Dataset.from_generator(
106
- lambda: txt_stream(DATA_PATH, num_lines=10000),
107
  output_signature=(
108
  tf.TensorSpec(shape=(max_len,), dtype=tf.int32),
109
  tf.TensorSpec(shape=(max_len,), dtype=tf.int32),
@@ -129,7 +129,7 @@ class SwiGLU(layers.Layer):
129
  return tf.cast(out, x.dtype)
130
 
131
  class SparseCausalAttention(tf.keras.layers.Layer):
132
- def __init__(self, num_heads, head_dim, window_size=16, **kwargs):
133
  super().__init__(**kwargs)
134
  self.num_heads = num_heads
135
  self.head_dim = head_dim
 
103
 
104
  # Dataset ์ƒ์„ฑ (์˜ˆ: ์ฒ˜์Œ 10,000๋ผ์ธ๋งŒ)
105
  dataset = tf.data.Dataset.from_generator(
106
+ lambda: txt_stream(DATA_PATH, num_lines=100000),
107
  output_signature=(
108
  tf.TensorSpec(shape=(max_len,), dtype=tf.int32),
109
  tf.TensorSpec(shape=(max_len,), dtype=tf.int32),
 
129
  return tf.cast(out, x.dtype)
130
 
131
  class SparseCausalAttention(tf.keras.layers.Layer):
132
+ def __init__(self, num_heads, head_dim, window_size=8, **kwargs):
133
  super().__init__(**kwargs)
134
  self.num_heads = num_heads
135
  self.head_dim = head_dim