KenteaKe11 commited on
Commit
c6af2df
·
1 Parent(s): 3ee52d7

KenT-300M: 8 layers, d_x=1024, N=32, D=240

Browse files
Files changed (3) hide show
  1. .gitignore +0 -0
  2. README.md +8 -7
  3. config.json +5 -5
.gitignore ADDED
Binary file (30 Bytes). View file
 
README.md CHANGED
@@ -22,18 +22,19 @@ tags:
22
 
23
  # KenT
24
 
25
- KenT is a recurrent language model from the SSM family. KenT concentrates its capacity in depth: many compact layers, each with a single transformation block, and a light learned-forgetting memory.
26
 
27
  > This repo contains `trust_remote_code` code; weights are stored in **FP16**.
28
 
29
  ## Architectural Philosophy
30
 
31
- - **Deep stack of compact layers.** KenT stacks many identical recurrent layers (24 in this ~300M model), each containing exactly
32
  one transformation block. The layers are connected in sequence through the representation stream, and the last layer produces
33
- the final output. Depth is prioritized: the deeper, the better, while width is kept at a level that stays balanced with it.
 
34
  - **Invest in the transformation core.** Capacity is concentrated in the "hidden" part, where features are actually transformed,
35
- rather than in the vocabulary table. Parameters were scaled from ~100M to ~300M mainly by adding depth, with width unchanged,
36
- so that both axes stay balanced (width still matters, but is not where the extra capacity went).
37
  - **Two streams, two roles.** One stream is a representation carrying information about the current token; the other is a memory
38
  stream that aggregates history. The two streams meet only through learned projections and are never mixed directly.
39
  - **Frequency as a fixed foundation, learning where it's needed.** Features are processed in the cosine-coefficient space using a
@@ -42,8 +43,8 @@ KenT is a recurrent language model from the SSM family. KenT concentrates its ca
42
  - **Memory with learned forgetting.** History is summarized with an exponential moving average
43
  `H_t = (1 - a) H_{t-1} + a u_t`, where `a` is a single learned scalar per layer. Its initial value decreases with depth
44
  (shallow layers forget fast, deep layers remember longer). The decoding state has **constant** size regardless of context length.
45
- - **Depth is the main axis.** There is no inner chain of blocks inside a layer any more: feature depth and memory timescale both
46
- grow with the number of layers.
47
  - **Chunk-parallelizable.** The moving average is a linear recurrence, so a long document can be split into blocks/chunks,
48
  processed concurrently, and merged with an affine scan, yielding the same result as sequential processing.
49
 
 
22
 
23
  # KenT
24
 
25
+ KenT is a recurrent language model from the SSM family. KenT concentrates its capacity in a very wide spectral representation: few layers, each with a single transformation block, and a light learned-forgetting memory.
26
 
27
  > This repo contains `trust_remote_code` code; weights are stored in **FP16**.
28
 
29
  ## Architectural Philosophy
30
 
31
+ - **Shallow stack, wide spectrum.** KenT stacks a few identical recurrent layers (8 in this ~300M model), each containing exactly
32
  one transformation block. The layers are connected in sequence through the representation stream, and the last layer produces
33
+ the final output. The representation stream feeding `lm_head` is wide (1024), and each layer's Bilinear projection expands it
34
+ into a large resolution axis (N = 32 DCT positions) with enough features per position (D = 240) before the DCT.
35
  - **Invest in the transformation core.** Capacity is concentrated in the "hidden" part, where features are actually transformed,
36
+ rather than in the vocabulary table. Parameters were scaled from ~100M to ~300M by widening the representation stream and the
37
+ spectral axes (N and D together), not by stacking more layers.
38
  - **Two streams, two roles.** One stream is a representation carrying information about the current token; the other is a memory
39
  stream that aggregates history. The two streams meet only through learned projections and are never mixed directly.
40
  - **Frequency as a fixed foundation, learning where it's needed.** Features are processed in the cosine-coefficient space using a
 
43
  - **Memory with learned forgetting.** History is summarized with an exponential moving average
44
  `H_t = (1 - a) H_{t-1} + a u_t`, where `a` is a single learned scalar per layer. Its initial value decreases with depth
45
  (shallow layers forget fast, deep layers remember longer). The decoding state has **constant** size regardless of context length.
46
+ - **Width is the main axis.** There is no inner chain of blocks inside a layer: each layer applies one DCT/SwiGLU block over a
47
+ large N x D grid, and memory timescale still varies across the 8 layers.
48
  - **Chunk-parallelizable.** The moving average is a linear recurrence, so a long document can be split into blocks/chunks,
49
  processed concurrently, and merged with an affine scan, yielding the same result as sequential processing.
50
 
config.json CHANGED
@@ -9,11 +9,11 @@
9
  "AutoModelForCausalLM": "model.KentForCausalLM"
10
  },
11
  "vocab_size": 50257,
12
- "hidden_size": 512,
13
- "num_hidden_layers": 24,
14
- "resolution_size": 8,
15
- "feature_dim": 512,
16
- "intermediate_size": 2048,
17
  "rms_norm_eps": 1e-05,
18
  "use_bias": true,
19
  "initializer_range": 0.02,
 
9
  "AutoModelForCausalLM": "model.KentForCausalLM"
10
  },
11
  "vocab_size": 50257,
12
+ "hidden_size": 1024,
13
+ "num_hidden_layers": 8,
14
+ "resolution_size": 32,
15
+ "feature_dim": 240,
16
+ "intermediate_size": 960,
17
  "rms_norm_eps": 1e-05,
18
  "use_bias": true,
19
  "initializer_range": 0.02,