KenteaKe11 commited on
Commit
d8e30ac
·
1 Parent(s): ebfe05c

fix architecture

Browse files
Files changed (3) hide show
  1. README.md +3 -3
  2. config.json +3 -3
  3. model.py +5 -5
README.md CHANGED
@@ -22,14 +22,14 @@ tags:
22
 
23
  # KenT
24
 
25
- KenT is a recurrent language model from the SSM family. Rather than stacking more layers, KenT concentrates its capacity in the **depth of the transformation inside a single cell**, and keeps temporal memory as simple as possible.
26
 
27
  > This repo contains `trust_remote_code` code; weights are stored in **FP16**.
28
 
29
  ## Architectural Philosophy
30
 
31
- - **One cell, no layer stacking.** KenT is a single recurrent cell; the model is not replicated into multiple layers.
32
- Depth comes not from the number of layers but from a chain of transformation blocks applied in sequence inside the cell.
33
  - **Invest in the transformation core.** Capacity is concentrated in the "hidden" part, where features are actually transformed,
34
  rather than in the vocabulary table or in repeating the architecture. The width and depth of this core are scaled together to
35
  stay balanced, rather than pushing a single dimension.
 
22
 
23
  # KenT
24
 
25
+ KenT is a recurrent language model from the SSM family. KenT concentrates its capacity in compact cells built from a short chain of transformation blocks, and keeps temporal memory as simple as possible.
26
 
27
  > This repo contains `trust_remote_code` code; weights are stored in **FP16**.
28
 
29
  ## Architectural Philosophy
30
 
31
+ - **A short chain of compact cells.** KenT stacks a few identical recurrent cells, each containing only two transformation blocks.
32
+ The cells are connected in sequence through the representation stream, and the last cell produces the final output.
33
  - **Invest in the transformation core.** Capacity is concentrated in the "hidden" part, where features are actually transformed,
34
  rather than in the vocabulary table or in repeating the architecture. The width and depth of this core are scaled together to
35
  stay balanced, rather than pushing a single dimension.
config.json CHANGED
@@ -10,10 +10,10 @@
10
  },
11
  "vocab_size": 50257,
12
  "hidden_size": 512,
13
- "num_hidden_layers": 1,
14
- "resolution_size": 32,
15
  "feature_dim": 512,
16
- "num_wnn_blocks": 16,
17
  "intermediate_size": 2048,
18
  "rms_norm_eps": 1e-05,
19
  "use_bias": true,
 
10
  },
11
  "vocab_size": 50257,
12
  "hidden_size": 512,
13
+ "num_hidden_layers": 5,
14
+ "resolution_size": 8,
15
  "feature_dim": 512,
16
+ "num_wnn_blocks": 2,
17
  "intermediate_size": 2048,
18
  "rms_norm_eps": 1e-05,
19
  "use_bias": true,
model.py CHANGED
@@ -39,10 +39,10 @@ class KentConfig(PretrainedConfig):
39
  Args:
40
  vocab_size: kích thước từ vựng.
41
  hidden_size: số chiều của representation stream X_t (d_x).
42
- num_hidden_layers: số KenT layer xếp chồng.
43
  resolution_size: N, độ dài trục mà DCT-II tác động lên.
44
  feature_dim: d_h, số chiều đặc trưng trên mỗi vị trí resolution.
45
- num_wnn_blocks: L, số WNN Block nối tiếp trong một timestep.
46
  intermediate_size: kích thước hidden của SwiGLU (trên trục d_h).
47
  rms_norm_eps: epsilon của RMSNorm.
48
  use_bias: dùng bias trong Bilinear / SwiGLU.
@@ -57,10 +57,10 @@ class KentConfig(PretrainedConfig):
57
  self,
58
  vocab_size: int = 50257,
59
  hidden_size: int = 512,
60
- num_hidden_layers: int = 1,
61
- resolution_size: int = 32,
62
  feature_dim: int = 512,
63
- num_wnn_blocks: int = 16,
64
  intermediate_size: int = 2048,
65
  rms_norm_eps: float = 1e-5,
66
  use_bias: bool = True,
 
39
  Args:
40
  vocab_size: kích thước từ vựng.
41
  hidden_size: số chiều của representation stream X_t (d_x).
42
+ num_hidden_layers: số KenT cell nối liền nhau (cell cuối sinh đầu ra cuối).
43
  resolution_size: N, độ dài trục mà DCT-II tác động lên.
44
  feature_dim: d_h, số chiều đặc trưng trên mỗi vị trí resolution.
45
+ num_wnn_blocks: L, số WNN Block nối tiếp trong MỖI cell.
46
  intermediate_size: kích thước hidden của SwiGLU (trên trục d_h).
47
  rms_norm_eps: epsilon của RMSNorm.
48
  use_bias: dùng bias trong Bilinear / SwiGLU.
 
57
  self,
58
  vocab_size: int = 50257,
59
  hidden_size: int = 512,
60
+ num_hidden_layers: int = 5,
61
+ resolution_size: int = 8,
62
  feature_dim: int = 512,
63
+ num_wnn_blocks: int = 2,
64
  intermediate_size: int = 2048,
65
  rms_norm_eps: float = 1e-5,
66
  use_bias: bool = True,