title: "模型可以住在表格裡嗎?CSV-Native Transformer 與可檢查模型狀態"
title_en: "Can a Model Live in Tables? CSV-Native Transformers and Inspectable Model State"
series: "矩陣原生智能與可稽核計算系列"
series_en: "Matrix-Native Intelligence and Auditable Computation Series"
series_id: "EML-MNIAC-2026"
paper_id: "EML-MNIAC-2026-01"
version: "v0.1"
date: "2026-08-16"
language: "zh-Hant"
document_type: "系列第01篇/Open Model State/可執行原型重構"
status: "Public Draft"
author: "Neo.K(許筌崴)/EveMissLab"
depends_on:
- "EML-MNIAC-2026-00 矩陣原生智能與可稽核計算總論 v0.1"
internal_artifacts:
- "nanocsv_llm.py"
- "自適應帳本量化代理框架技術規格.md"
- "EveTessera / Veritaxa Workbench 試算表原生爬蟲與 Agent 系統技術白皮書"
canonical_keywords:
- Open Model State
- CSV-Native Transformer
- Inspectable Model State
- Model Persistence
- State Reconstruction
- Tabular Representation
- Model Identity
- Serialization
- Reproducible Inference
模型可以住在表格裡嗎?
CSV-Native Transformer 與可檢查模型狀態
Can a Model Live in Tables? CSV-Native Transformers and Inspectable Model State
摘要
本文是《矩陣原生智能與可稽核計算》系列第 01 篇,重新檢視本系列最早、也最容易被誤解的實驗命題:人工智慧模型是否可以「住在表格裡」?
本文以 nanocsv_llm.py 為核心實驗對象。該原型是一個最小字元級 Transformer,具有 token embedding、position embedding、單頭 causal attention、MLP、residual connection、cross entropy、反向傳播與 Adam optimizer;其核心特徵不是模型架構本身,而是將全部可訓練模型參數、詞彙表與結構設定外部化為 CSV 檔案,並驗證:
梯度計算與有限差分一致;
訓練損失下降;
模型經 save → reload 後,確定性生成保持一致。
本文主張,此實驗不能被解讀為「CSV 是更好的大型模型格式」,也不能推出「Excel 可以直接取代 GPU runtime」。它真正支持的是一個較小但重要的命題:
對至少一類有限神經模型而言,完整推論所需的可學習狀態可以被外部化為開放表格表示。 \boxed{
\text{對至少一類有限神經模型而言,完整推論所需的可學習狀態可以被外部化為開放表格表示。}
} 對至少一類有限神經模型而言,完整推論所需的可學習狀態可以被外部化為開放表格表示。
本文進一步將「模型保存」拆成四個不同層級:
Persistence ≠ Reconstruction ≠ Execution ≠ Auditability . \text{Persistence}
\neq
\text{Reconstruction}
\neq
\text{Execution}
\neq
\text{Auditability}. Persistence = Reconstruction = Execution = Auditability .
並將 CSV-Native 原型與現代 state_dict、Safetensors、ONNX 等模型持久化/交換方法放在同一工程座標中。本文的核心結論不是要求大型模型使用 CSV,而是提出 Open Model State :模型狀態可以被視為一組可命名、可定址、可檢查、可雜湊、可版本化與可重新裝載的外部結構,而不必在概念上與某個特定二進位封裝永久綁定。
1. 問題的重新定義
1.1 「模型住在表格裡」不是什麼?
若直接聽到:
「把 AI 大模型放進 Excel/CSV。」
最容易出現三種誤解。
第一種:
CSV = Neural Runtime . \text{CSV}
=
\text{Neural Runtime}. CSV = Neural Runtime .
第二種:
Spreadsheet Formula = Transformer . \text{Spreadsheet Formula}
=
\text{Transformer}. Spreadsheet Formula = Transformer .
第三種:
Human-readable ⇒ Computationally Efficient . \text{Human-readable}
\Rightarrow
\text{Computationally Efficient}. Human-readable ⇒ Computationally Efficient .
本文不接受這三個等號。
nanocsv_llm.py 的真正架構是:
CSV = Persistent Model State \boxed{
\text{CSV}
=
\text{Persistent Model State}
} CSV = Persistent Model State
而:
NumPy + Python = Execution Engine . \boxed{
\text{NumPy + Python}
=
\text{Execution Engine}.
} NumPy + Python = Execution Engine .
因此最早原型真正研究的是:
模型狀態是否可以脫離不透明 binary container,而以非常普通的表格形式存在?
2. Model、State 與 Runtime 必須分開
定義一個神經模型:
M = ( A , Θ , Γ ) , M
=
(
\mathcal A,
\Theta,
\Gamma
), M = ( A , Θ , Γ ) ,
其中:
A \mathcal A A :architecture;
Θ \Theta Θ :learned parameters;
Γ \Gamma Γ :configuration / vocabulary / execution assumptions。
推論可寫為:
y = F A , Γ ( x ; Θ ) . y
=
F_{\mathcal A,\Gamma}(x;\Theta). y = F A , Γ ( x ; Θ ) .
這裡真正被 CSV 外部化的是:
Θ + Γ , \Theta
+
\Gamma, Θ + Γ ,
而不是完整:
F . F. F .
因此:
Model State ≠ Model Runtime . \boxed{
\text{Model State}
\neq
\text{Model Runtime}.
} Model State = Model Runtime .
同樣地:
Model State ≠ Model Architecture Description \boxed{
\text{Model State}
\neq
\text{Model Architecture Description}
} Model State = Model Architecture Description
除非架構本身也被足夠完整地保存。
3. nanocsv_llm.py 的最小模型
3.1 參數集合
原型的可訓練參數為:
Θ = { W t e , W p e , W q , W k , W v , W o , W 1 , b 1 , W 2 , b 2 , W h , b h } . \Theta
=
\{
W_{te},
W_{pe},
W_q,
W_k,
W_v,
W_o,
W_1,
b_1,
W_2,
b_2,
W_h,
b_h
\}. Θ = { W t e , W p e , W q , W k , W v , W o , W 1 , b 1 , W 2 , b 2 , W h , b h } .
其中:
W t e ∈ R V × D W_{te}\in\mathbb R^{V\times D} W t e ∈ R V × D
是 token / character embedding,
W p e ∈ R T × D W_{pe}\in\mathbb R^{T\times D} W p e ∈ R T × D
是 position embedding。
Attention 為:
Q = X W q , Q=XW_q, Q = X W q ,
K = X W k , K=XW_k, K = X W k ,
V = X W v . V=XW_v. V = X W v .
注意力分數:
A = Q K ⊤ D + M c a u s a l . A
=
\frac{QK^\top}{\sqrt D}
+
M_{\mathrm{causal}}. A = D Q K ⊤ + M causal .
經 row softmax:
P = softmax ( A ) , P
=
\operatorname{softmax}(A), P = softmax ( A ) ,
輸出:
O = P V . O=PV. O = P V .
並形成 residual:
X ′ = X + O W o . X'
=
X+OW_o. X ′ = X + O W o .
MLP 為:
H = ReLU ( X ′ W 1 + b 1 ) , H
=
\operatorname{ReLU}
(X'W_1+b_1), H = ReLU ( X ′ W 1 + b 1 ) ,
X ′ ′ = X ′ + H W 2 + b 2 . X''
=
X'
+
HW_2+b_2. X ′′ = X ′ + H W 2 + b 2 .
最後 logits:
Z = X ′ ′ W h + b h . Z
=
X''W_h+b_h. Z = X ′′ W h + b h .
此架構不是前沿模型,也沒有 LayerNorm、多頭 attention、RoPE、MoE 或深層堆疊。
它的角色是:
最小但真正可訓練、可生成、可保存的 Transformer-like test object . \boxed{
\text{最小但真正可訓練、可生成、可保存的 Transformer-like test object}.
} 最小但真正可訓練、可生成、可保存的 Transformer-like test object .
4. 為什麼使用字元級模型?
若實驗目的不是追求語言品質,而是測試:
Save → Reload → Same Inference , \text{Save}
\rightarrow
\text{Reload}
\rightarrow
\text{Same Inference}, Save → Reload → Same Inference ,
則字元級模型具有三個優點:
tokenizer 極簡;
vocabulary 可完整攤開;
state space 小到可以人工檢查。
詞彙映射:
s t o i : c h a r → i d , stoi:
char\rightarrow id, s t o i : c ha r → i d ,
i t o s : i d → c h a r . itos:
id\rightarrow char. i t os : i d → c ha r .
可直接保存為:
vocab.csv
因此模型最低可重建集合為:
S M = ( Θ , V o c a b , C o n f i g ) . \boxed{
\mathcal S_M
=
(
\Theta,
Vocab,
Config
).
} S M = ( Θ , V oc ab , C o n f i g ) .
5. CSV State Layout
5.1 每個矩陣一個檔案
原型使用:
weights/
├─ Wte.csv
├─ Wpe.csv
├─ Wq.csv
├─ Wk.csv
├─ Wv.csv
├─ Wo.csv
├─ W1.csv
├─ b1.csv
├─ W2.csv
├─ b2.csv
├─ Wh.csv
├─ bh.csv
├─ vocab.csv
└─ config.csv
因此:
Θ k ⟷ F i l e k . \Theta_k
\longleftrightarrow
File_k. Θ k ⟷ F i l e k .
這種設計的最大優點不是速度,而是:
Parameter Naming Becomes Physical and Inspectable . \boxed{
\text{Parameter Naming Becomes Physical and Inspectable}.
} Parameter Naming Becomes Physical and Inspectable .
也就是:
你可以直接指出「這是 W q W_q W q 」,而不是只知道某個巨大二進位區段「可能包含它」。
5.2 Config
最小設定包括:
V , D , H , T l e n . V,
D,
H,
T_{len}. V , D , H , T l e n .
其中:
V V V :vocabulary size;
D D D :embedding dimension;
H H H :MLP hidden dimension;
T l e n T_{len} T l e n :context length。
因此:
config.csv
不只是附註,而是重建模型 shape 的必要條件。
6. 第一個驗證:Gradient Check
若一個模型只是「可以 forward」,但 backward 錯誤,那麼 persistence 實驗沒有太大意義。
原型首先比較 analytic gradient 與 finite-difference gradient。
對參數:
θ , \theta, θ ,
數值梯度為:
g n u m = L ( θ + ϵ ) − L ( θ − ϵ ) 2 ϵ . g_{\mathrm{num}}
=
\frac{
L(\theta+\epsilon)
-
L(\theta-\epsilon)
}{
2\epsilon
}. g num = 2 ϵ L ( θ + ϵ ) − L ( θ − ϵ ) .
解析梯度:
g a n a = ∂ L ∂ θ . g_{\mathrm{ana}}
=
\frac{\partial L}{\partial\theta}. g ana = ∂ θ ∂ L .
檢查:
∣ g n u m − g a n a ∣ < 10 − 6 . \boxed{
|g_{\mathrm{num}}-g_{\mathrm{ana}}|
<
10^{-6}.
} ∣ g num − g ana ∣ < 1 0 − 6 .
這代表原型至少不是「會吐文字的隨機公式拼裝器」。
它具有可核對的 learning mechanics。
7. 第二個驗證:Loss 是否真的下降?
模型使用 Adam 更新。
若:
L e a r l y L_{\mathrm{early}} L early
代表訓練初期平均 loss,
而:
L l a t e L_{\mathrm{late}} L late
代表末期平均 loss,
則最低要求:
L l a t e < L e a r l y . L_{\mathrm{late}}
<
L_{\mathrm{early}}. L late < L early .
原型甚至設置更強的測試條件:
L l a t e < L e a r l y − 0.3. L_{\mathrm{late}}
<
L_{\mathrm{early}}
-
0.3. L late < L early − 0.3.
這個實驗仍然不證明模型「理解語言」。
它只證明:
這是一個真正進行參數學習的有限模型。 \boxed{
\text{這是一個真正進行參數學習的有限模型。}
} 這是一個真正進行參數學習的有限模型。
8. 第三個驗證:Save → Reload → Same Generation
這是本文最核心的實驗。
假設:
M 1 M_1 M 1
是訓練完成後的 in-memory model。
先生成:
Y 1 = G ( M 1 , x ) . Y_1
=
G(M_1,x). Y 1 = G ( M 1 , x ) .
之後:
S a v e ( M 1 ) → C S V . Save(M_1)
\rightarrow
CSV. S a v e ( M 1 ) → C S V .
再:
M 2 = L o a d ( C S V ) . M_2
=
Load(CSV). M 2 = L o a d ( C S V ) .
重新生成:
Y 2 = G ( M 2 , x ) . Y_2
=
G(M_2,x). Y 2 = G ( M 2 , x ) .
確定性條件下要求:
Y 1 = Y 2 . \boxed{
Y_1=Y_2.
} Y 1 = Y 2 .
原型選擇 greedy generation:
t e m p e r a t u r e = 0. temperature=0. t e m p er a t u r e = 0.
這非常重要。
如果使用 stochastic sampling,
即使:
M 1 = M 2 , M_1=M_2, M 1 = M 2 ,
仍可能:
Y 1 ≠ Y 2 Y_1\neq Y_2 Y 1 = Y 2
而不能直接判定 persistence failure。
因此這個測試真正測的是:
State Reconstruction Fidelity . \boxed{
\text{State Reconstruction Fidelity}.
} State Reconstruction Fidelity .
9. Open Model State
本文正式定義:
定義 1 — Open Model State
設模型:
M = ( A , Θ , Γ ) . M=(\mathcal A,\Theta,\Gamma). M = ( A , Θ , Γ ) .
若存在外部表示:
R ( M ) , R(M), R ( M ) ,
使得:
Θ \Theta Θ 可被顯式定址;
Γ \Gamma Γ 足以重建 required shapes / vocabulary / configuration;
state 可被獨立讀取;
state 可被重新載入;
declared deterministic inference equivalence 可測試;
則稱:
R ( M ) R(M) R ( M )
為該模型的一個 Open Model State representation 。
形式上:
M → S a v e R ( M ) → L o a d M ′ . M
\xrightarrow{Save}
R(M)
\xrightarrow{Load}
M'. M S a v e R ( M ) L o a d M ′ .
若對指定測試域:
X T , \mathcal X_T, X T ,
有:
∀ x ∈ X T , F M ( x ) = F M ′ ( x ) , \forall x\in\mathcal X_T,
\quad
F_M(x)=F_{M'}(x), ∀ x ∈ X T , F M ( x ) = F M ′ ( x ) ,
則稱:
R ( M ) R(M) R ( M )
通過該域上的 reconstruction equivalence。
10. 四個常被混淆的層級
這是本文最重要的分類。
10.1 Persistence
State can be saved. \boxed{
\text{State can be saved.}
} State can be saved.
表示 bytes 存在。
這是最低層。
10.2 Reconstruction
Saved state can reconstruct an equivalent model instance. \boxed{
\text{Saved state can reconstruct an equivalent model instance.}
} Saved state can reconstruct an equivalent model instance.
需要:
shape;
parameter naming;
vocabulary;
model configuration;
correct loading logic。
10.3 Execution
The representation itself has executable semantics or can be executed by a defined runtime. \boxed{
\text{The representation itself has executable semantics or can be executed by a defined runtime.}
} The representation itself has executable semantics or can be executed by a defined runtime.
CSV-Native POC 沒有 證明:
C S V CSV C S V
本身就是 efficient execution runtime。
它需要 Python / NumPy execution layer。
10.4 Auditability
A human or machine can inspect, identify, compare and verify relevant state components. \boxed{
\text{A human or machine can inspect, identify, compare and verify relevant state components.}
} A human or machine can inspect, identify, compare and verify relevant state components.
這比「檔案是文字格式」更強。
真正 auditability 還需要:
schema;
stable identifiers;
shape declarations;
hashes;
version;
provenance;
diff semantics;
corruption detection。
因此:
P e r s i s t e n c e ≠ R e c o n s t r u c t i o n ≠ E x e c u t i o n ≠ A u d i t a b i l i t y . \boxed{
Persistence
\neq
Reconstruction
\neq
Execution
\neq
Auditability.
} P er s i s t e n ce = R eco n s t r u c t i o n = E x ec u t i o n = A u d i t abi l i t y .
11. 與現代模型保存方法的關係
11.1 PyTorch state_dict
PyTorch 的典型模式本身已經把:
Architecture Code \text{Architecture Code} Architecture Code
與:
Parameter State \text{Parameter State} Parameter State
分開。
一個 state_dict 本質上是:
N a m e → T e n s o r . Name
\rightarrow
Tensor. N am e → T e n sor .
因此 CSV-Native POC 並沒有發明「模型狀態可序列化」。
它把同一概念推向另一個極端:
Parameter State → Plain Tabular Files . \boxed{
\text{Parameter State}
\rightarrow
\text{Plain Tabular Files}.
} Parameter State → Plain Tabular Files .
其研究價值是 transparency,而非框架效率。
11.2 Safetensors
Safetensors 的問題設定更偏向:
S a f e + F a s t + T e n s o r − O r i e n t e d S e r i a l i z a t i o n . \boxed{
Safe
+
Fast
+
Tensor-Oriented Serialization.
} S a f e + F a s t + T e n sor − O r i e n t e d S er ia l i z a t i o n .
它適合真實大模型部署。
CSV 的問題設定則更偏向:
I n s p e c t a b l e + S i m p l e + T o o l − A g n o s t i c + H u m a n − R e a d a b l e . \boxed{
Inspectable
+
Simple
+
Tool-Agnostic
+
Human-Readable.
} I n s p ec t ab l e + S im pl e + T oo l − A g n os t i c + H u man − R e a d ab l e .
兩者不是同一 optimization target。
因此不能用:
「Safetensors 比 CSV 快。」
來否定 CSV-Native POC。
同樣也不能用:
「CSV 比 Safetensors 好看。」
來主張 CSV 應替代 Safetensors。
11.3 ONNX
ONNX 更進一步保存:
C o m p u t a t i o n G r a p h + O p e r a t o r s + T e n s o r I n i t i a l i z e r s + M e t a d a t a . \boxed{
ComputationGraph
+
Operators
+
Tensor Initializers
+
Metadata.
} C o m p u t a t i o n G r a p h + O p er a t or s + T e n sor I ni t ia l i z er s + M e t a d a t a .
這代表:
State \text{State} State
與:
Executable Graph Semantics \text{Executable Graph Semantics} Executable Graph Semantics
開始被放進同一模型交換框架。
從本系列角度看,ONNX 對後來 MLF / MMLC 的啟發點不是「使用 protobuf」,而是:
一個可攜模型不能只知道參數值,還需要知道這些值如何進入計算。
12. CSV 的真正弱點
如果研究要誠實,CSV 的限制非常明顯。
12.1 Type Weakness
CSV 原生沒有:
tensor dtype;
shape semantics;
endian;
quantization metadata;
sparse layout;
device semantics。
12.2 Structural Weakness
一個矩陣:
W q W_q W q
被保存成 CSV 後,不會自動知道:
「我是 Query projection matrix。」
語義必須存在於:
f i l e n a m e , s c h e m a , m a n i f e s t , e x t e r n a l s p e c . filename,
schema,
manifest,
external spec. f i l e nam e , sc h e ma , mani f es t , e x t er na l s p ec .
12.3 Scale Weakness
大型模型可能具有:
10 9 ∼ 10 12 10^9
\sim
10^{12} 1 0 9 ∼ 1 0 12
級參數。
若每個浮點數都使用十進位文字表示:
S t o r a g e C o s t C S V ≫ S t o r a g e C o s t b i n a r y . StorageCost_{\mathrm{CSV}}
\gg
StorageCost_{\mathrm{binary}}. S t or a g e C os t CSV ≫ S t or a g e C os t binary .
Parsing cost 也會顯著增加。
12.4 Precision Risk
若:
S a v e P r e c i s i o n < I n t e r n a l P r e c i s i o n , SavePrecision
<
InternalPrecision, S a v e P r ec i s i o n < I n t er na l P r ec i s i o n ,
則:
Θ → Θ ~ \Theta
\rightarrow
\tilde\Theta Θ → Θ ~
可能產生 rounding drift。
原型使用:
%.10g
因此:
identical generation \boxed{
\text{identical generation}
} identical generation
只代表該 toy model、該輸入與該 deterministic generation test 下沒有產生可觀察輸出差異。
它不等於:
Θ = Θ ~ bitwise . \boxed{
\Theta=\tilde\Theta
\text{ bitwise}.
} Θ = Θ ~ bitwise .
這是本文必須比早期直覺寫得更精確的地方。
13. 「相同生成」也不是完整模型同一性
假設:
G ( M 1 , x ) = G ( M 2 , x ) . G(M_1,x)=G(M_2,x). G ( M 1 , x ) = G ( M 2 , x ) .
不能推出:
M 1 = M 2 . M_1=M_2. M 1 = M 2 .
因為可能:
Θ 1 ≠ Θ 2 \Theta_1\neq\Theta_2 Θ 1 = Θ 2
但在有限測試集上:
F Θ 1 ( x ) = F Θ 2 ( x ) . F_{\Theta_1}(x)
=
F_{\Theta_2}(x). F Θ 1 ( x ) = F Θ 2 ( x ) .
因此需要分至少三種 identity。
13.1 Byte Identity
H ( Θ 1 ) = H ( Θ 2 ) . H(\Theta_1)=H(\Theta_2). H ( Θ 1 ) = H ( Θ 2 ) .
13.2 Parameter Identity
對所有 named parameters:
Θ 1 [ k ] = Θ 2 [ k ] . \Theta_1[k]=\Theta_2[k]. Θ 1 [ k ] = Θ 2 [ k ] .
13.3 Behavioral Identity on Domain
∀ x ∈ X T , F Θ 1 ( x ) = F Θ 2 ( x ) . \forall x\in\mathcal X_T,
\quad
F_{\Theta_1}(x)
=
F_{\Theta_2}(x). ∀ x ∈ X T , F Θ 1 ( x ) = F Θ 2 ( x ) .
三者強度不同。
CSV-Native 原型的原始 C3 主要驗證的是:
B e h a v i o r a l I d e n t i t y \boxed{
Behavioral Identity
} B e ha v i or a l I d e n t i t y
在一個非常有限的 deterministic generation test 上成立。
14. 從 POC 到正式 Open Model State
如果今天重新做 v1.0,不應只保留:
Wq.csv
Wk.csv
...
而應增加 manifest。
例如:
format: open-model-state
version: 1.0
architecture:
family: minimal-causal-transformer
code_hash: ...
implementation_version: ...
vocabulary:
path: vocab.csv
hash: ...
config:
path: config.csv
hash: ...
parameters:
- id: Wte
path: tensors/Wte.csv
shape: [23, 24]
dtype: float64
semantic_role: token_embedding
hash: ...
- id: Wq
path: tensors/Wq.csv
shape: [24, 24]
dtype: float64
semantic_role: attention_query_projection
hash: ...
tests:
- gradient_check
- loss_decrease
- reload_parameter_compare
- deterministic_inference_compare
這樣:
Readable Files \boxed{
\text{Readable Files}
} Readable Files
才真正開始升級為:
Auditable Model Package . \boxed{
\text{Auditable Model Package}.
} Auditable Model Package .
15. 模型狀態可以是一個帳本嗎?
Open Model State 自然會導向下一個問題:
假設:
Θ 0 → Θ 1 → Θ 2 → ⋯ → Θ t . \Theta_0
\rightarrow
\Theta_1
\rightarrow
\Theta_2
\rightarrow
\cdots
\rightarrow
\Theta_t. Θ 0 → Θ 1 → Θ 2 → ⋯ → Θ t .
如果每個版本都只覆寫:
Wq.csv
則歷史消失。
更完整的模型帳本應保存:
E t = ( t i m e s t a m p , p a r a m e t e r , b e f o r e , a f t e r , c a u s e , o p t i m i z e r , d a t a , p r o v e n a n c e ) . E_t
=
(
timestamp,
parameter,
before,
after,
cause,
optimizer,
data,
provenance
). E t = ( t im es t am p , p a r am e t er , b e f or e , a f t er , c a u se , o pt imi z er , d a t a , p r o v e nan ce ) .
於是:
Θ t \Theta_t Θ t
不只是一個 snapshot,
而是:
Θ t = F o l d ( E 0 , … , E t ) . \boxed{
\Theta_t
=
Fold(E_0,\ldots,E_t).
} Θ t = F o l d ( E 0 , … , E t ) .
這就是 Open Model State 與後續 Ledger / MLF / PHOSPHOR event-stream 理論之間的第一條正式橋。
16. 表格真正提供的是「可定位性」
二進位 tensor 一樣可以被命名。
但表格直覺的特殊價值是:
Coordinate + Name + Visible Value . \boxed{
\text{Coordinate}
+
\text{Name}
+
\text{Visible Value}.
} Coordinate + Name + Visible Value .
例如 embedding:
E i , : E_{i,:} E i , :
可以被理解為:
vocabulary item i i i 對應的一列向量。
因此:
High-Dimensional Vector \boxed{
\text{High-Dimensional Vector}
} High-Dimensional Vector
沒有因為存在於 AI 模型裡就失去「表格列」這個普通身份。
這個認知破除是早期實驗真正有價值的一點:
大模型再巨大,其底層參數仍然是可以被索引、切片、命名與序列化的數值結構。
這不神秘化 AI,也不因此低估其整體湧現能力。
17. 可檢查不等於可理解
這裡需要再加一個重要限制。
即使:
Θ \Theta Θ
全部攤開,
人類仍未必知道:
Θ i , j \Theta_{i,j} Θ i , j
「代表什麼概念」。
因此:
I n s p e c t a b l e ≠ I n t e r p r e t a b l e . \boxed{
Inspectable
\neq
Interpretable.
} I n s p ec t ab l e = I n t er p r e t ab l e .
CSV 解決的是:
Where is the state? \text{Where is the state?} Where is the state?
而不是:
What does every parameter mean? \text{What does every parameter mean?} What does every parameter mean?
同樣:
R e a d a b l e ≠ S e m a n t i c a l l y T r a n s p a r e n t . \boxed{
Readable
\neq
Semantically Transparent.
} R e a d ab l e = S e man t i c a l l y T r an s p a r e n t .
這條區分避免把 Open Model State 誤寫成完整 mechanistic interpretability。
18. 可檢查也不等於安全
如果 state 可以被直接編輯:
Θ → Θ ′ , \Theta
\rightarrow
\Theta', Θ → Θ ′ ,
則也必須面對:
accidental corruption;
malicious tampering;
unauthorized modification;
version drift;
partial overwrite。
因此 Open Model State 若走向正式工程,需要:
H a s h + S i g n a t u r e + S c h e m a + V e r s i o n + A t o m i c W r i t e + R o l l b a c k . \boxed{
Hash
+
Signature
+
Schema
+
Version
+
AtomicWrite
+
Rollback.
} H a s h + S i g na t u r e + S c h e ma + V er s i o n + A t o mi c W r i t e + R o l l ba c k .
這也是後來 Veritaxa 與 MLF 逐步加入:
checksum;
fingerprint;
append-only history;
source lock;
safe copy;
的原因。
19. Open Model State 的五層成熟度
本文提出一個五層分類。
OMS-0 — Opaque State
模型只能透過專用 runtime 操作,外部難以定位 state。
OMS-1 — Named Serialization
N a m e → T e n s o r . Name\rightarrow Tensor. N am e → T e n sor .
具名參數可以保存與載入。
OMS-2 — Inspectable State
state 能被通用工具讀取與逐項檢查。
CSV-Native POC 主要位於此層。
OMS-3 — Verifiable State
增加:
S c h e m a + H a s h + V e r s i o n + S h a p e + D T y p e + R e c o n s t r u c t i o n T e s t s . Schema
+
Hash
+
Version
+
Shape
+
DType
+
ReconstructionTests. S c h e ma + H a s h + V er s i o n + S ha p e + D T y p e + R eco n s t r u c t i o n T es t s .
OMS-4 — Auditable State Ledger
再增加:
P r o v e n a n c e + H i s t o r y + D i f f + A u t h o r i z a t i o n + R o l l b a c k + P r o m o t i o n . Provenance
+
History
+
Diff
+
Authorization
+
Rollback
+
Promotion. P r o v e nan ce + H i s t or y + D i f f + A u t h or i z a t i o n + R o l l ba c k + P r o m o t i o n .
此時模型 state 不只是 checkpoint,而開始成為可治理研究物件。
20. 可證偽條件
F1 — Reconstruction Failure
若:
M ′ = L o a d ( S a v e ( M ) ) M'
=
Load(Save(M)) M ′ = L o a d ( S a v e ( M ))
後無法執行同一 declared architecture,
Open Model State failure。
F2 — Parameter Drift
若 claimed lossless save/load 後:
∃ k : Θ k ≠ Θ k ′ , \exists k:
\Theta_k\neq\Theta'_k, ∃ k : Θ k = Θ k ′ ,
則 lossless claim 失敗。
F3 — Behavioral Drift
若 declared deterministic test domain 中:
∃ x : F M ( x ) ≠ F M ′ ( x ) , \exists x:
F_M(x)\neq F_{M'}(x), ∃ x : F M ( x ) = F M ′ ( x ) ,
則 behavioral reconstruction claim 失敗。
F4 — Missing Semantic Binding
若檔案存在但無法知道:
F i l e i ↔ P a r a m e t e r i , File_i
\leftrightarrow
Parameter_i, F i l e i ↔ P a r am e t e r i ,
則 inspectability 只能算 byte readability,不能算 model-state auditability。
F5 — Architecture Dependency Hidden
若重建依賴某個未保存的:
code version;
operator semantics;
tokenizer rule;
dtype assumption;
則 package 並不自足。
21. 對大型模型的真正問題
對大型模型而言,最重要的問題不是:
能不能真的把一兆參數全部存成 CSV?
技術上,只要儲存足夠大,當然可以。
真正問題是:
是否值得? \boxed{
\text{是否值得?}
} 是否值得?
對 production runtime:
A n s w e r ≈ N o . Answer\approx No. A n s w er ≈ N o .
對 educational / audit / forensic / reduced-slice views:
A n s w e r ≈ O f t e n Y e s . Answer\approx Often\ Yes. A n s w er ≈ O f t e n Y es .
因此較合理的方向是:
Binary Canonical Tensor Storage + Inspectable Tabular Projection . \boxed{
\text{Binary Canonical Tensor Storage}
+
\text{Inspectable Tabular Projection}.
} Binary Canonical Tensor Storage + Inspectable Tabular Projection .
也就是不要求:
C S V = canonical physical bytes , CSV=\text{canonical physical bytes}, C S V = canonical physical bytes ,
而允許:
Φ t a b l e ( Θ ) \Phi_{\mathrm{table}}(\Theta) Φ table ( Θ )
成為可逆或可驗證的 human / AI inspection view。
這一點直接連到後來的 MLF projection philosophy。
22. 與 MLF 的橋接
Open Model State 可以自然寫成 MLF 類型的 projection。
設 canonical model state:
S M . S_M. S M .
則:
Φ t e n s o r ( S M ) = Safetensors / framework tensors , \Phi_{\mathrm{tensor}}(S_M)
=
\text{Safetensors / framework tensors}, Φ tensor ( S M ) = Safetensors / framework tensors ,
Φ g r a p h ( S M ) = ONNX-like computation graph , \Phi_{\mathrm{graph}}(S_M)
=
\text{ONNX-like computation graph}, Φ graph ( S M ) = ONNX-like computation graph ,
Φ t a b l e ( S M ) = CSV / Spreadsheet inspection view , \Phi_{\mathrm{table}}(S_M)
=
\text{CSV / Spreadsheet inspection view}, Φ table ( S M ) = CSV / Spreadsheet inspection view ,
Φ a u d i t ( S M ) = hash / provenance / diff ledger . \Phi_{\mathrm{audit}}(S_M)
=
\text{hash / provenance / diff ledger}. Φ audit ( S M ) = hash / provenance / diff ledger .
所以早期 nanocsv_llm.py 可以重新理解成:
Open Model State 的第一個極簡 projection experiment . \boxed{
\text{Open Model State 的第一個極簡 projection experiment}.
} Open Model State 的第一個極簡 projection experiment .
而不是終極格式提案。
23. 本文結論
「模型可以住在表格裡嗎?」
答案需要分層。
如果問題是:
模型所有權重能否以表格保存?
答案:
Y e s . \boxed{
Yes.
} Y es .
如果問題是:
保存後能否重新建模並保持指定 deterministic inference?
對本文原型:
Y e s , u n d e r t h e t e s t e d c o n d i t i o n s . \boxed{
Yes,\ under\ the\ tested\ conditions.
} Y es , u n d er t h e t es t e d co n d i t i o n s .
如果問題是:
CSV 本身是不是 Transformer runtime?
答案:
N o . \boxed{
No.
} N o .
如果問題是:
CSV 是否適合作為大型模型 production checkpoint?
本文:
N o s u c h c l a i m . \boxed{
No\ such\ claim.
} N o s u c h c l aim .
如果問題是:
表格是否仍具有 AI 工程價值?
本文的答案是:
Y e s , \boxed{
Yes,
} Y es ,
但價值不在取代專用 tensor format,而在:
Inspectability + Addressability + Versionability + Reconstruction Testing . \boxed{
\text{Inspectability}
+
\text{Addressability}
+
\text{Versionability}
+
\text{Reconstruction Testing}.
} Inspectability + Addressability + Versionability + Reconstruction Testing .
因此本文最終提出:
模型狀態可以被視為一個外部、可命名、可檢查、可驗證的結構, 而不是只能被視為某個框架內部不可見的參數黑盒。 \boxed{
\textbf{
模型狀態可以被視為一個外部、可命名、可檢查、可驗證的結構,
而不是只能被視為某個框架內部不可見的參數黑盒。
}
} 模型狀態可以被視為一個外部、可命名、可檢查、可驗證的結構, 而不是只能被視為某個框架內部不可見的參數黑盒。
這就是整個「矩陣原生智能與可稽核計算」系列的第一塊工程地基。
24. 下一篇
EML-MNIAC-2026-02
《學習作為帳本流:不變量、投影約束與不可消除結構殘差》
下一篇將正式處理:
Learning + Invariant + Projection + Residual . \boxed{
\text{Learning}
+
\text{Invariant}
+
\text{Projection}
+
\text{Residual}.
} Learning + Invariant + Projection + Residual .
並回答:
當模型被允許學習,但不能離開某個合法狀態域時,什麼條件下 constraint 不會殺死 learning?而什麼時候 constraint 本身就是錯的?
參考資料
內部原型與既有文件
EveMissLab, nanocsv_llm.py, minimal char-level Transformer with CSV-native parameter persistence.
EveMissLab, ledger_experiment.py.
EveMissLab, build_xlsx.py.
《自適應帳本量化代理框架技術規格》。
《EveTessera / Veritaxa Workbench 試算表原生爬蟲與 Agent 系統技術白皮書》。
《矩陣原生智能與可稽核計算:從表格模型狀態到多重投影執行同一性的統一研究綱領》。
外部工程對照
PyTorch Tutorials, Saving and Loading Models .https://docs.pytorch.org/tutorials/beginner/saving_loading_models
Hugging Face, Safetensors Documentation .https://huggingface.co/docs/safetensors/index
ONNX Documentation, ONNX Concepts .https://onnx.ai/onnx/intro/concepts.html
ONNX Documentation, Open Neural Network Exchange Intermediate Representation Specification .https://onnx.ai/onnx/repo-docs/IR.html
系列狀態: 第 01 篇完成。下一篇: EML-MNIAC-2026-02 —《學習作為帳本流:不變量、投影約束與不可消除結構殘差》