Update Stage C Chinese model card
Browse files- README_zh.md +34 -168
README_zh.md
CHANGED
|
@@ -1,186 +1,52 @@
|
|
| 1 |
-
# TMCRA TokenGraph-LLM
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
|
| 10 |
-
token_graph_llm_v1_relation_finetune_3k.pt PyTorch checkpoint
|
| 11 |
-
summary.json 本次 checkpoint 的训练摘要
|
| 12 |
-
more_val_examples_greedy_24.json 24 条 greedy 验证样例
|
| 13 |
-
SHA256SUM.txt checkpoint SHA256 校验值
|
| 14 |
-
README.md 英文说明
|
| 15 |
-
README_zh.md 中文说明
|
| 16 |
-
MODEL_CARD.md 模型卡片
|
| 17 |
-
```
|
| 18 |
-
|
| 19 |
-
## Checkpoint
|
| 20 |
-
|
| 21 |
-
- 文件名:`token_graph_llm_v1_relation_finetune_3k.pt`
|
| 22 |
-
- 大小:约 78.85 MiB
|
| 23 |
-
- SHA256:
|
| 24 |
-
|
| 25 |
-
```text
|
| 26 |
-
0F32BD7105825EF78EEEF509940D51E2BA9AC7F7E9E34C41F46E3442CF9A7057
|
| 27 |
-
```
|
| 28 |
-
|
| 29 |
-
## 架构
|
| 30 |
-
|
| 31 |
-
- 类型:图原生自回归语言模型原型
|
| 32 |
-
- hidden dimension:384
|
| 33 |
-
- graph encoder layers:6
|
| 34 |
-
- graph causal decoder layers:8
|
| 35 |
-
- embedding:untied output embedding
|
| 36 |
-
- max sequence tokens:160
|
| 37 |
-
- Transformer self-attention:未使用
|
| 38 |
-
- 推理时外部 LLM:未使用
|
| 39 |
-
|
| 40 |
-
## 训练规模
|
| 41 |
-
|
| 42 |
-
该 checkpoint 基于一个约 100 万图样本的 base model 继续微调:
|
| 43 |
-
|
| 44 |
-
- train samples:920,048
|
| 45 |
-
- validation samples:80,004
|
| 46 |
-
- vocabulary size:1,012
|
| 47 |
-
|
| 48 |
-
随后进行了 3,000 step 的 graph-path objective 微调。
|
| 49 |
-
|
| 50 |
-
## 微调目标
|
| 51 |
-
|
| 52 |
-
主目标:
|
| 53 |
-
|
| 54 |
-
- next-token prediction
|
| 55 |
-
|
| 56 |
-
辅助目标:
|
| 57 |
-
|
| 58 |
-
- token path loss
|
| 59 |
-
- transition path loss
|
| 60 |
-
- relation transition loss
|
| 61 |
-
- causal path consistency loss
|
| 62 |
-
|
| 63 |
-
3000 step 最终验证指标:
|
| 64 |
-
|
| 65 |
-
```text
|
| 66 |
-
val loss: 1.884280
|
| 67 |
-
lm loss: 1.816859
|
| 68 |
-
token path loss: 0.984824
|
| 69 |
-
transition path loss: 0.393090
|
| 70 |
-
relation transition loss: 1.208215
|
| 71 |
-
causal path loss: 1.569850
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
本轮最佳验证点是 step 2500:
|
| 75 |
-
|
| 76 |
-
```text
|
| 77 |
-
val loss: 1.872795
|
| 78 |
-
lm loss: 1.805862
|
| 79 |
-
relation transition loss: 1.206935
|
| 80 |
-
causal path loss: 1.635989
|
| 81 |
-
```
|
| 82 |
-
|
| 83 |
-
## 效果样例
|
| 84 |
-
|
| 85 |
-
以下是 greedy 输出,用于展示真实能力边界,不是润色后的宣传样例。
|
| 86 |
-
|
| 87 |
-
### 故事续写
|
| 88 |
-
|
| 89 |
-
Prompt:
|
| 90 |
-
|
| 91 |
-
```text
|
| 92 |
-
Continue the story in natural language.
|
| 93 |
-
```
|
| 94 |
-
|
| 95 |
-
模型输出:
|
| 96 |
-
|
| 97 |
-
```text
|
| 98 |
-
to her mom. "Mom, can I have some oats?" she asked. Her mom said, "Yes, but be careful. That is very yummy!" Mia was so excited to eat the oats that she wanted to show her friends.
|
| 99 |
-
```
|
| 100 |
-
|
| 101 |
-
### 故事续写
|
| 102 |
-
|
| 103 |
-
Prompt:
|
| 104 |
-
|
| 105 |
-
```text
|
| 106 |
-
Continue the story in natural language.
|
| 107 |
-
```
|
| 108 |
-
|
| 109 |
-
模型输出:
|
| 110 |
-
|
| 111 |
-
```text
|
| 112 |
-
she wanted to play. She asked her mom if they could play. Her mom said yes and they started to play together. They had so much fun playing with the boot. At the end of the day, Emily and Tim were tired but happy.
|
| 113 |
-
```
|
| 114 |
-
|
| 115 |
-
### 代码解释弱样例
|
| 116 |
-
|
| 117 |
-
Prompt:
|
| 118 |
-
|
| 119 |
-
```text
|
| 120 |
-
What was the primary purpose of this piece of code? Code: def f(x): return x * 3
|
| 121 |
-
```
|
| 122 |
-
|
| 123 |
-
模型输出:
|
| 124 |
-
|
| 125 |
-
```text
|
| 126 |
-
The primary purpose of this code.
|
| 127 |
-
```
|
| 128 |
-
|
| 129 |
-
### 事实问答失败样例
|
| 130 |
-
|
| 131 |
-
Prompt:
|
| 132 |
-
|
| 133 |
-
```text
|
| 134 |
-
How deep was the water that rushed through the school?
|
| 135 |
-
```
|
| 136 |
-
|
| 137 |
-
模型输出:
|
| 138 |
-
|
| 139 |
-
```text
|
| 140 |
-
feetings.com food.
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
-
## 当前能力边界
|
| 144 |
-
|
| 145 |
-
相对较强:
|
| 146 |
|
| 147 |
-
-
|
| 148 |
-
-
|
| 149 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
-
|
| 152 |
|
| 153 |
-
|
| 154 |
-
- 数字和数量
|
| 155 |
-
- 列表生成
|
| 156 |
-
- 抽象定义
|
| 157 |
-
- 多语言 prompt
|
| 158 |
-
- 稳定指令跟随
|
| 159 |
|
| 160 |
-
|
| 161 |
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
-
|
| 165 |
|
| 166 |
```text
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
|
|
|
| 170 |
```
|
| 171 |
|
| 172 |
-
|
| 173 |
|
| 174 |
-
|
| 175 |
|
| 176 |
-
|
| 177 |
-
- 继续微调
|
| 178 |
-
- token attribution 实验
|
| 179 |
-
- 架构展示
|
| 180 |
|
| 181 |
-
|
| 182 |
|
| 183 |
-
|
| 184 |
-
- 事实问答
|
| 185 |
-
- 作为成熟 LLM 进行 benchmark 宣称
|
| 186 |
-
- 面向用户的聊天机器人
|
|
|
|
| 1 |
+
# TMCRA TokenGraph-LLM Stage C
|
| 2 |
|
| 3 |
+
TMCRA TokenGraph-LLM 是实验性的图原生自回归语言模型原型。它不是 Transformer 外壳,推理时也不调用外部 LLM。文本生成来自 token 级图编码、学习式边门控、图消息传递和动态图因果解码器。
|
| 4 |
|
| 5 |
+
本 Hugging Face 仓库主要托管模型资产。完整源码、训练脚本、建图脚本和文档在 GitHub:
|
| 6 |
|
| 7 |
+
https://github.com/reshuibuduo/TMCRA-TokenGraph-LLM
|
| 8 |
|
| 9 |
+
## 当前模型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
- 版本线:`v0.2.0-stagec`
|
| 12 |
+
- 模型包:`tgclm_stagec_model_package_20260606.zip`
|
| 13 |
+
- checkpoint:`checkpoint/token_graph_dynamic_decoder_v3.pt`
|
| 14 |
+
- 参数量:`114,615,372`
|
| 15 |
+
- 结构:`dim=512`,`graph_layers=8`,`decoder_layers=10`
|
| 16 |
+
- embedding:untied
|
| 17 |
+
- 训练精度:`bf16`
|
| 18 |
+
- 有效训练样本:约 `1.03M`
|
| 19 |
+
- 训练步数:`62,000`
|
| 20 |
+
- SHA256:`1cebd34362e51a2e5c3e5ba8e96df04b353b763f10b73acc13a67442a3b2dae3`
|
| 21 |
|
| 22 |
+
旧 v0.1 文件可能仍保留用于历史对比。当前推荐使用 Stage C 模型包。
|
| 23 |
|
| 24 |
+
## 全链路训练代码
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
GitHub 源码仓库已经补齐 Stage C 全链路训练路径:
|
| 27 |
|
| 28 |
+
- 开源语料转换为 schema2 JSONL;
|
| 29 |
+
- 可选 OpenAI 兼容接口或本地 Hugging Face teacher 标注;
|
| 30 |
+
- token-level reasoning graph dataset 构建;
|
| 31 |
+
- `simple_plus_causal_target` 图模式;
|
| 32 |
+
- Stage C 训练和 checkpoint 续训;
|
| 33 |
+
- 图消融和 token attribution 评测。
|
| 34 |
|
| 35 |
+
入口文档:
|
| 36 |
|
| 37 |
```text
|
| 38 |
+
docs/FULL_CHAIN_TRAINING.md
|
| 39 |
+
docs/FULL_CHAIN_TRAINING_ZH.md
|
| 40 |
+
scripts/run_stagec_full_chain_template.sh
|
| 41 |
+
scripts/run_stagec_sharded_training_template.sh
|
| 42 |
```
|
| 43 |
|
| 44 |
+
## 能力边界
|
| 45 |
|
| 46 |
+
Stage C 能生成早期英文故事续写,并且图消融显示 typed graph edges 会实质影响生成结果。它还不是生产可用 LLM。当前弱项包括精确事实问答、数值推理、稳定指令跟随、强语法、多语种生成和长程概念绑定。
|
| 47 |
|
| 48 |
+
当前结果是 smoke 测试,不是榜单成绩。
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
## 许可证
|
| 51 |
|
| 52 |
+
MIT。
|
|
|
|
|
|
|
|
|