Config: Explicitly set `ffn_act_fn` as `silu`| Tiktoken: Fix vocab size to include special tokens (#15)
Browse files- config.json +4 -1
- tiktoken.py +1 -1
config.json
CHANGED
@@ -20,7 +20,10 @@
|
|
20 |
"moe_jitter_eps": 0.01,
|
21 |
"moe_loss_weight": 0.05,
|
22 |
"moe_num_experts": 16,
|
23 |
-
"moe_top_k": 4
|
|
|
|
|
|
|
24 |
},
|
25 |
"initializer_range": 0.02,
|
26 |
"max_seq_len": 32768,
|
|
|
20 |
"moe_jitter_eps": 0.01,
|
21 |
"moe_loss_weight": 0.05,
|
22 |
"moe_num_experts": 16,
|
23 |
+
"moe_top_k": 4,
|
24 |
+
"ffn_act_fn": {
|
25 |
+
"name": "silu"
|
26 |
+
}
|
27 |
},
|
28 |
"initializer_range": 0.02,
|
29 |
"max_seq_len": 32768,
|
tiktoken.py
CHANGED
@@ -247,7 +247,7 @@ class TiktokenTokenizerWrapper(PreTrainedTokenizer):
|
|
247 |
# Get an index to add and add the item
|
248 |
vocab_clone[candidate_extra_id] = index_to_add
|
249 |
|
250 |
-
return vocab_clone
|
251 |
|
252 |
def _tokenize(self, text: str) -> List[str]:
|
253 |
"""Returns a tokenized string."""
|
|
|
247 |
# Get an index to add and add the item
|
248 |
vocab_clone[candidate_extra_id] = index_to_add
|
249 |
|
250 |
+
return dict(vocab_clone, **self.added_tokens_encoder)
|
251 |
|
252 |
def _tokenize(self, text: str) -> List[str]:
|
253 |
"""Returns a tokenized string."""
|