Yuchan
commited on
Update Model.py
Browse files
Model.py
CHANGED
|
@@ -54,7 +54,7 @@ if not os.path.exists(DATA_PATH):
|
|
| 54 |
|
| 55 |
if not os.path.exists(TOKENIZER_PATH):
|
| 56 |
download_file(
|
| 57 |
-
"https://huggingface.co/Yuchan5386/
|
| 58 |
TOKENIZER_PATH
|
| 59 |
)
|
| 60 |
|
|
@@ -127,7 +127,7 @@ class SwiGLU(layers.Layer):
|
|
| 127 |
out = self.W1(tf.nn.silu(a) * b)
|
| 128 |
return tf.cast(out, x.dtype)
|
| 129 |
|
| 130 |
-
class SparseCausalAttention(Layer):
|
| 131 |
def __init__(self, num_heads, head_dim, window_size=16, **kwargs):
|
| 132 |
super().__init__(**kwargs)
|
| 133 |
self.num_heads = num_heads
|
|
|
|
| 54 |
|
| 55 |
if not os.path.exists(TOKENIZER_PATH):
|
| 56 |
download_file(
|
| 57 |
+
"https://huggingface.co/Yuchan5386/inlam-100m/resolve/main/ko_unigram.model?download=true",
|
| 58 |
TOKENIZER_PATH
|
| 59 |
)
|
| 60 |
|
|
|
|
| 127 |
out = self.W1(tf.nn.silu(a) * b)
|
| 128 |
return tf.cast(out, x.dtype)
|
| 129 |
|
| 130 |
+
class SparseCausalAttention(tf.keras.layers.Layer):
|
| 131 |
def __init__(self, num_heads, head_dim, window_size=16, **kwargs):
|
| 132 |
super().__init__(**kwargs)
|
| 133 |
self.num_heads = num_heads
|