KenT-20M-Base

~19.6M tham số, mô hình ngôn ngữ hồi quy một token mỗi bước. Không attention: lịch sử nằm trong bộ nhớ EMA học được ở mọi độ sâu.

h_0 = x[t]                                    # embedding, (1, D)
h_i = h_{i-1} + SwiGLU(RMSNorm(h_{i-1}))      # i = 1..n   khối xanh

u_i      = RMSNorm(h_i) · D^T · W_i           # i = 0..n   khối cam "~DCT-II Proj (D^T)W"
H_i[t+1] = (1 - A_i) ⊙ H_i[t] + A_i ⊙ u_i     # Learnable EMA Matrix, A = sigmoid(logits), shape (n+1, D)

S   = Σ_i H_i[t+1]                            # Add
y   = S · D                                   # "DCT-II Proj (D)" (DCT ngược)
out = y + SwiGLU(RMSNorm(y))
logits = LM_head(RMSNorm_f(out))              # tied với embedding

Sơ đồ kiến trúc mạng Tiến hóa Vi phân

D là ma trận DCT-II trực chuẩn cố định (hàng = tần số, vector hàng nên DCT là x·D^T); W học được, khởi tạo ≈ I. RMSNorm_f không có trong sơ đồ, thêm để logits ổn định.

vocab 50257 (GPT-2), tied embedding / LM head
D (hidden_size) 240
n khối xanh (num_hidden_layers) 12 (→ 13 tap EMA)
SwiGLU hidden (intermediate_size) 720 (3D)
tham số ≈ 19.56M (embedding 12.06M)
trạng thái giải mã H shape (13, 240), O(1) theo độ dài

EMA khởi tạo theo cấp số nhân từ 0.5 (tap đầu, feature đầu) đến 0.01 (tap cuối, feature cuối); vẫn học được. EMA chạy FP32 bằng affine-scan log-depth, kết quả bằng đúng hồi quy tuần tự.

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Vi-LAB/KenT-20M-Base", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Vi-LAB/KenT-20M-Base", trust_remote_code=True)

Hoặc python infer.py --model Vi-LAB/KenT-20M-Base --prompt "Today the weather is".

Downloads last month
30
Safetensors
Model size
19.6M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train Vi-LAB/KenT-20M-Base