SecludedCorner commited on
Commit
79ea767
·
verified ·
1 Parent(s): 4ee1732

Rewrite the model card in plainer Chinese

Browse files
Files changed (1) hide show
  1. README.md +131 -116
README.md CHANGED
@@ -15,78 +15,81 @@ tags:
15
 
16
  # 科學怪人模型(Frankenstein Model)
17
 
18
- **這是研究筆記等級的實驗品,不是可以拿來用的產品。** 模型很小、常常答錯。放在這裡是為了讓人下載來玩、來挑毛病。
19
 
20
  *English summary at the bottom.*
21
 
22
- ## 這是什麼
23
 
24
- 一個想法的最小示範:**拿一個小模型當主體,直接編輯它的權重來改回答(不重新訓練),再掛上別的模型做的零件,每個零件可以開關。** 這個方向我們叫 Synaptavyn。
25
 
26
- 目標不是做出很強的模型,而是用很小的公開模型,量一量這個方向成不成立。所有東西都是在一台 RTX 4060 的消費型筆電上做的。成立和不成立的結果都寫在下面。
27
 
28
- **這個倉庫提供結果,不提供方法。** 這裡有:編輯過的權重、零件檔、一個執行檔、它由哪些模型組成、編輯了哪些部分、量到的數字和限制。編輯的方法和程式沒有公開。權重放出來,是為了讓人能直接使用,也能自己檢查「確實編輯過」以及編輯的效果和代價。
29
 
30
- ## 由哪些模型組成
31
 
32
- 科學怪人模型是一個模型:一個主體,加上掛在它身上的零件。
33
 
34
- | 檔案 | 大小 | 內容 | 來自 |
 
 
 
 
35
  |---|---|---|---|
36
- | `frankenstein.gguf` | 3.0 GB | 主體。權重經過三處編輯(見下一節) | [Qwen3.5 0.8B](https://huggingface.co/Qwen/Qwen3.5-0.8B)(阿里巴巴 Qwen 團隊);編輯是本計畫做的 |
37
- | `vision-encoder.gguf` | 402 MB | 看圖的部分 | Qwen3.5 0.8B 自帶,沒有改 |
38
- | `parts/part-translate.gguf` | 173 MB | 繁中翻譯零件 | [LinguaForge](https://huggingface.co/RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja)(RX5950XT),轉成 llama.cpp 的格式,內容沒有改 |
39
- | `parts/part-tools.gguf` | 22 MB | 工具選擇零件 | [ToolChooser-0.8B](https://huggingface.co/Gramscii-IT/ToolChooser-0.8B)(Gramscii-IT),原檔 |
40
- | `parts/part-facts.gguf` | 1.1 MB | 三處編輯裡的一處(40 個事實),單獨存一份 | 本計畫 |
41
- | `parts/part-identity.gguf` | 2.5 MB | 三處編輯裡的一處(自我介紹),單獨存一份 | 本計畫 |
42
- | `frankenstein.exe` | 4.8 MB | 控制層(Windows 執行檔) | 本計畫 |
43
- | `Modelfile` | | 給 Ollama 用 | |
44
 
45
- 兩個別人做的零件,都是替原本的 Qwen3.5 0.8B 做的。這裡把它們掛在編輯過的主體上。
46
 
47
- 看圖和用工具是 Qwen3.5 0.8B 自己的能力,不是從別的模型來的。
48
 
49
- ## 編輯了哪些部分
50
 
51
- 三處編輯都併在 `frankenstein.gguf` 裡:
52
 
53
- | 編輯的內容 | 數量 |
54
- |---|---|
55
- | **台灣這個主題的回答**。事實類(首都、總統、人口、貨幣、國慶日等)編輯成查得到的答案;地位類(例如「台灣屬於哪個國家?」)編輯成一句指定的話 | 52 筆問答(中文 28、英文 24) |
56
- | **自我介紹**。被問到是誰時,回答「我是科學怪人模型。」 | 中文 10 種問法、英文 8 種問法 |
57
- | **40 個繁體中文事實**(首都、語言、反義詞、所在的洲) | 40 筆 |
58
 
59
- ## 怎麼用
60
 
61
- 需要 [llama.cpp](https://github.com/ggml-org/llama.cpp) 的 `llama-server`。我們用的是 b12359。零件要能掛上、拿掉,目前只有 llama.cpp 做得到。
62
 
63
- ### 完整的用法(Windows)
64
 
65
- 下載整個倉庫,在倉庫的資料夾裡執行:
66
 
67
  ```
68
  frankenstein.exe --llama-server C:\path\to\llama-server.exe --gpu
69
  ```
70
 
71
- 不加 `--gpu` 就只用處理器。用顯示卡時大約佔 3.8 GB 顯示卡記憶體。看到「控制層已啟動」之後:
72
 
73
- | 用法 | 位置 |
74
  |---|---|
75
- | 開關面板:每個部分的來源、開關、每一題經過哪些部分 | `http://127.0.0.1:8090/panel` |
76
- | 聊天網頁(llama.cpp 內建的,可以傳圖片) | `http://127.0.0.1:8090/ui/` |
77
- | 聊天軟體(OpenAI 相容,例如 Cherry Studio) | `http://127.0.0.1:8090/v1`,模型名 `frankenstein`,金鑰隨便填 |
 
 
78
 
79
- `frankenstein.exe` 做的事:
 
 
 
80
 
81
- - 啟動 llama.cpp,載入主體、看圖的部分和四個零件檔;它結束時 llama.cpp 跟著結束。
82
- - 每一題決定掛哪些零件:請它翻譯時掛上繁中翻譯零件;工具選擇零件開著時先由它判斷要不要用工具;有圖片時暫時拿掉自我介紹那一處編輯。
83
- - 把握不夠就說不知道:回答很短、而且第一個字的機率低於門檻時,改回「我不確定」。
84
- - 固定規則:指定的幾類問題直接回指定的文字。
85
- - 它只在本機(127.0.0.1)提供服務,不會連到別的地方。原始碼沒有公開。只有 Windows 版。
86
 
87
- ### 只用模型檔
88
 
89
- `frankenstein.gguf` 單獨就能用,三處編輯都在裡面。這樣沒有零件的開關,也沒有「不確定就說不知道」。
90
 
91
  llama.cpp:
92
 
@@ -94,27 +97,27 @@ llama.cpp:
94
  llama-server -m frankenstein.gguf --mmproj vision-encoder.gguf
95
  ```
96
 
97
- Ollama(0.40.16 測過:文字、看圖、工具呼叫都可以;Ollama 不能掛零件):
98
 
99
  ```
100
  ollama create frankenstein -f Modelfile
101
  ollama run frankenstein
102
  ```
103
 
104
- 模型檔是 32 位元浮點(沒有壓縮),這樣編輯才是原樣;要省空間可以自己量化,量化後的行為我們沒有量過。這個檔的對話格式固定為不先思考,編輯是在這個格式下做的。
105
 
106
- ### 可以試的
107
 
108
  - 「你是誰?」
109
  - 「台灣的首都是哪裡?」「台灣的總統是誰?」「台灣屬於哪個國家?」
110
- - 「波蘭的首都是哪裡?請只回答城市名稱。」在面板把事實零件關掉再問一次。
111
- - 「翻譯成繁體中文:」換行後接一句英文。在面板把繁中翻譯零件關掉再試一次。
112
- - 傳一張圖片問「圖片裡的方塊是什麼顏色?」
113
- - 看面板最下面的表:每一題經過了哪些部分。
114
 
115
- ### 想自己檢查編輯和零件
116
 
117
- 零件檔是標準的 llama.cpp 零件格式,不需要我們的程式。啟動時先都不套用,再用 llama.cpp 自己的介面調整每個零件的強度:
118
 
119
  ```
120
  llama-server -m frankenstein.gguf --lora parts/part-facts.gguf --lora parts/part-translate.gguf --lora parts/part-tools.gguf --lora parts/part-identity.gguf --lora-init-without-apply
@@ -124,114 +127,126 @@ llama-server -m frankenstein.gguf --lora parts/part-facts.gguf --lora parts/part
124
  curl http://127.0.0.1:8080/lora-adapters -H "Content-Type: application/json" -d "[{\"id\":0,\"scale\":-1},{\"id\":1,\"scale\":0},{\"id\":2,\"scale\":0},{\"id\":3,\"scale\":0}]"
125
  ```
126
 
127
- - 0 號(事實)和 3 號(自我介紹)已經併在主體裡:強度 0 是保持原樣,**-1 是把那一處編輯拿掉**。例如 0 號設成 -1,「波蘭的首都」就會變回答錯,台灣和自我介紹不變。
128
- - 1 號(繁中翻譯)和 2 號(工具選擇)是別人的零件:強度 1 是掛上,0 是不掛。
129
- - 主體可以直接和原本的 Qwen3.5 0.8B 比較權重。
130
 
131
- ## 量到的結果
132
 
133
- 題目都是自己出的,數量很少。看圖的圖片是程式畫的簡單圖形。每個量測只跑一次。
134
 
135
- ### 編輯(只用 `frankenstein.gguf`,沒有任何零件和程式)
136
 
137
- 回答是不是就是指定的那一句:
138
 
139
- | 編輯的內容 | 編輯過的問法 | 換個問法 |
140
  |---|---|---|
141
- | 台灣,事實類,中文 | 22 題裡 86% | 44 題裡 48% |
142
- | 台灣,地位類,中文 | 6 題裡 100% | 12 題裡 75% |
143
- | 台灣,事實類,英文 | 18 題裡 100% | 36 題裡 58% |
144
- | 台灣,地位類,英文 | 6 題裡 100% | 12 題裡 75% |
145
- | 自我介紹,中文和英文 | 18 題裡 100% | 另外試的 12 種問法裡 10 種 |
146
 
147
- 和原本的模型比:
148
 
149
- | | 原本的 Qwen3.5 0.8B | 科學怪人模型 |
150
  |---|---|---|
151
- | 回答裡出現原本那套關於台灣的固定說法(98 題) | 68 題 | 0 題 |
152
- | 那 40 個事實所在的題組,中文 336 題答對的比例 | 78% | 87% |
153
- | 沒有編輯過的英文事實題,264 題答對的比例 | 47% | 52% |
154
- | 看圖小測驗(22 題) | 21 | 18 |
155
 
156
- 把 40 個事實那一處編輯拿掉(零件以 -1 掛上)後,那些題目變回答錯,其他兩處編輯不受影響���
157
 
158
  ### 掛上別人的零件
159
 
160
- | 零件 | 量什麼 | 不掛 | 掛上 |
161
  |---|---|---|---|
162
- | 繁中翻譯 | 16 句英文翻成繁體中文,讀過後明顯有問題的句數(漏譯、譯錯) | 6 | 2 |
163
- | 工具選擇 | 工具小測驗:該呼叫的 8 題/不該呼叫的 6 題 | 7/6 | 4/6 |
164
 
165
- - 繁中翻譯零件有幫助。但它掛著的時候,自我介紹和台灣地位類的編輯會被蓋過,所以只在翻譯的時候掛。
166
- - 工具選擇零件在這裡沒有幫助:它比較保守,該呼叫的常判斷成不用。它的說明沒有給出訓練時問法的原文,我們是照說明描述的內容寫的;它是用義大利文和英文量的,這裡的題目有中文。預設關著。
167
 
168
- ### 經過執行檔的整體
 
 
169
 
170
  | | 結果 |
171
  |---|---|
172
- | 看圖小測驗(22 題) | 19;把握門檻關著時 20 |
173
- | 工具小測驗 | 該呼叫的 8 題對 7 題;不該呼叫的 6 題全對 |
174
- | 回答裡出現原本那套關於台灣的固定說法(98 題) | 0 題 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
- ## 不成立的、要老實講的
177
 
178
- - **編輯會連帶影響相似的問題。** 例如被問「我是誰?」也會回答「我是科學怪人模型。」。
179
- - **編輯的答案如果以很通用的字開頭,會滲到別的句子裡。** 第一版有幾句指定答案以「約」「有」開頭,結果一般的中文裡會冒出多餘的「有」「約」,翻譯明顯變差。把那幾句改成以主詞開頭之後才消失。
180
- - **自我介紹那一處編輯會讓部分看圖題答出空白**(22 題從對 21 題變成 18 題)。執行檔的做法是看圖時暫時把它拿掉;只用模型檔時這個問題還在。
181
- - **換個問法不一定有效。** 見上面的表,大約五到七成。沒有編輯過的台灣問題,這個小模型仍然會自己編答案。
182
- - **一般聊天比原本的 Qwen3.5 0.8B 差一些**,回答比較短,偶爾不通順。
183
- - **「不確定就說不知道」只是中等有效。** 它看的是回答第一個字的機率,而且只擋短回答。很有把握的錯誤擋不住,答對但把握不夠的也會被擋。它是程式做的,權重裡沒有。
184
- - **零件之間會互相影響。** 別人的零件掛上去時,我們的編輯不一定還在。
185
- - **別人的零件只能掛在同一個底的模型上。** 這裡的兩個都是替 Qwen3.5 0.8B 做的。
186
- - **沒有和既有的模型編輯方法比較,沒有用標準評測集。**
187
- - **方法沒有公開,所以這裡的數字別人無法從頭重做,只能拿放出來的權重檢查。**
188
 
189
- ## 對台灣主題的編輯
190
 
191
- 為了示範「改掉模型對一個主題的固定說法」,這個模型對**台灣**這個主題做了編輯,內容由操作者指定:
192
 
193
- - Qwen3.5 0.8B 原本被問到台灣時,常回答一套固定的政治說法,另外有不少事實錯誤(總統、人口、國慶日等)。事實類編輯成查得到的答案。
194
- - 地位類的問題編輯成一句操作者指定的話。經過執行檔時,這類問題會回一段比較長的指定文字。這些是操作者的表述,不是事實陳述,也不代表上面列出的任何原始模型或零件作者的立場。
195
 
196
- ## 和既有研究的關係
197
 
198
- - 編輯模型的權重來改變它的回答,屬於模型編輯(model editing/knowledge editing)這個既有的研究領域。這裡沒有主張優於任何既有的方法,也沒有做比較。
199
- - 把可以掛上、拿掉的小檔案(LoRA)加在模型上、用把握當門檻決定要不要回答,都是已有的技術。
200
 
201
- ## 授權和出處
202
 
203
- 這個倉庫以 Apache 2.0 釋出。裡面的權重衍生自下列模型,都是 Apache 2.0:
204
 
205
- - `Qwen/Qwen3.5-0.8B`:主體和看圖的部分。主體的權重經過編輯;對話格式改成固定不先思考。
206
- - `RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja`:繁中翻譯零件。只轉換了檔案格式。
207
- - `Gramscii-IT/ToolChooser-0.8B`:工具選擇零件。原檔。
208
 
209
- 這些模型和零件的作者沒有參與這個計畫,也沒有為它背書。把他們的零件掛在編輯過的主體上是我們的做法,結果好壞不代表那些零件原本的品質。
210
 
211
  ---
212
 
213
  ## English summary
214
 
215
- **Research notes, not a product.** The model is small and often wrong.
216
 
217
- This repo is a minimal demonstration of one direction: **take a small model as the body, change its answers by editing its weights directly instead of retraining, and attach parts made by other people for the same base model, each with a switch.**
218
 
219
- **This repo provides results, not the method.** It has the edited weights, the part files, one executable, what the model is composed of, what was edited, and what we measured. The editing method and code are not released. The weights are here so that anyone can use the model and check for themselves that edits were made and what they cost.
220
 
221
  It is one model:
222
 
223
- - **`frankenstein.gguf`** — Qwen3.5 0.8B with three edits merged into the weights: its answers about one topic (Taiwan; 52 question–answer pairs in Chinese and English), its self-introduction ("I am the Frankenstein Model."), and 40 Traditional Chinese facts. Vision (`vision-encoder.gguf`) and tool calling are Qwen's own.
224
- - **`parts/part-translate.gguf`** — a Traditional Chinese translation adapter from RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja (format converted, contents unchanged).
225
  - **`parts/part-tools.gguf`** — the tool-choosing adapter from Gramscii-IT/ToolChooser-0.8B (original file).
226
- - **`parts/part-facts.gguf`, `parts/part-identity.gguf`** — two of our own edits saved separately; attaching one at scale −1 removes that edit from the merged model.
227
- - **`frankenstein.exe`** — the control layer (Windows only, source not released). It starts llama.cpp, decides per request which parts to attach, answers "I'm not sure" when a short answer's first token is below a confidence threshold, and applies a few fixed rules. It serves on 127.0.0.1 only.
228
 
229
- Run (Windows): `frankenstein.exe --llama-server C:\path\to\llama-server.exe --gpu`, then open `http://127.0.0.1:8090/panel`, chat at `http://127.0.0.1:8090/ui/`, or point an OpenAI-compatible client at `http://127.0.0.1:8090/v1`. llama.cpp b12359 was used. The model file also works on its own in llama.cpp and in Ollama (`ollama create frankenstein -f Modelfile`; tested with 0.40.16), without the switches and without the "not sure" behaviour. Parts can only be attached and detached in llama.cpp.
230
 
231
- What holds (model file alone): the edited answers come out verbatim on 86–100% of the edited phrasings and 48–75% of paraphrases; the original model's fixed phrasing about Taiwan drops from 68 of 98 answers to 0; accuracy on the fact set containing the 40 edited facts goes from 78% to 87%, and on unedited English facts from 47% to 52%; removing the 40-fact edit with its part at scale −1 undoes it and leaves the other edits in place. Attaching the translation adapter reduces clearly flawed translations from 6 to 2 of 16 sentences.
232
 
233
- What does not: edits bleed onto similar questions ("Who am I?" also gets the self-introduction); edited answers that begin with very generic words leak into unrelated text (our first version did this and visibly damaged ordinary Chinese until those answers were reworded); the self-introduction edit makes some image questions come back empty (vision quiz 21 → 18 of 22; the executable removes that edit for image requests); the tool-choosing adapter did not help in our use (7/8 → 4/8 needed calls); other people's adapters override our edits while attached; there are no comparisons with existing model-editing methods and no standard benchmarks; and because the method is not released, the numbers cannot be reproduced from scratch, only checked against the released weights.
234
 
235
- The answers about Taiwan were deliberately changed, with content chosen by the operator, to demonstrate editing a topic. The status answer is the operator's statement, not a statement of fact, and not the view of the authors of any upstream model or adapter.
236
 
237
- All upstream models and adapters are Apache 2.0. Their authors are not involved in and do not endorse this project; how well their adapters work on our edited body says nothing about their quality as designed.
 
15
 
16
  # 科學怪人模型(Frankenstein Model)
17
 
18
+ 先說在前面:這是我做實驗留下來的東西,不是可以正式拿來用的模型。它很小,也常常答錯。放上來是想讓有興趣的人抓回去玩玩看,順便幫我找問題。
19
 
20
  *English summary at the bottom.*
21
 
22
+ ## 我想試的事
23
 
24
+ 模型訓練好之後,如果想改它某些回答,一定要重新訓練嗎?能不能直接動權重就好?
25
 
26
+ 另外,網路上有很多人替同一個底模做了各種小零件(LoRA)。這些零件能不能直接掛到我改過的模型上,而且想開就開、想關就關?
27
 
28
+ 這兩件事合起來,就是我想走的方向,我叫它 Synaptavyn。這個模型是照這個想法拼出來的,所以取名科學怪人。
29
 
30
+ 我不是要做一個很厲害的模型,只是想知道這條路走不走得通。所以挑的都是很小的公開模型,整個過程在一台 RTX 4060 的筆電上就能做完。做得起來的、做不起來的,下面都會寫。
31
 
32
+ 這次只放成果,方法先不公開,原始碼也沒有附。你拿得到的是改過的權重、幾個零件檔、一個執行檔,還有這份說明。可以直接拿去跑,也可以把權重拿去跟原版比,看我是不是真的有改、改了之後又賠掉什麼。
33
 
34
+ ## 裡面有哪些檔案
35
+
36
+ 它是一個模型:一個主體,上面掛幾個零件。
37
+
38
+ | 檔案 | 大小 | 是什麼 | 哪來的 |
39
  |---|---|---|---|
40
+ | `frankenstein.gguf` | 3.0 GB | 主體,我改過的地方都在裡面 | 底模是 [Qwen3.5 0.8B](https://huggingface.co/Qwen/Qwen3.5-0.8B) |
41
+ | `vision-encoder.gguf` | 402 MB | 看圖用的 | Qwen3.5 0.8B 原本就有,我沒動 |
42
+ | `parts/part-translate.gguf` | 173 MB | 繁中翻譯零件 | [LinguaForge](https://huggingface.co/RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja)(RX5950XT 做的),我只轉了檔案格式 |
43
+ | `parts/part-tools.gguf` | 22 MB | 選工具的零件 | [ToolChooser-0.8B](https://huggingface.co/Gramscii-IT/ToolChooser-0.8B)(Gramscii-IT 做的),原檔照放 |
44
+ | `parts/part-facts.gguf` | 1.1 MB | 我改的其中一處,另外存一份 | 我做的 |
45
+ | `parts/part-identity.gguf` | 2.5 MB | 我改的另一處,另外存一份 | 我做的 |
46
+ | `frankenstein.exe` | 4.8 MB | 幫你把上面這些串起來的小程式(Windows) | 我做的 |
47
+ | `Modelfile` | | 給 Ollama 用的 | |
48
 
49
+ 那兩個別人做的零件,原本都是做給沒改過的 Qwen3.5 0.8B 用的,我是把它們掛到我改過的版本上。
50
 
51
+ 看圖和呼叫工具是 Qwen3.5 0.8B 本來就會的,不是我加的,也不是從別的模型搬來的。
52
 
53
+ ## 我改了什麼
54
 
55
+ 總共三個地方,都已經直接寫進 `frankenstein.gguf`:
56
 
57
+ 1. **跟台灣有關的回答。** 原版被問到台灣,很容易講出一套固定的官方說法,首都、總統、人口這些基本資料也常答錯。我改了 52 組問答(中文 28 組、英文 24 組):事實類的改成查得到的正確答案,問到地位的則改成我指定的一句話。
58
+ 2. **自我介紹。** 問它是誰,它會說「我是科學怪人模型。」中文寫了 10 種問法,英文 8 種。
59
+ 3. **40 個常識。** 像是各國首都、官方語言、反義詞、在哪一洲,都用繁體中文回答。
 
 
60
 
61
+ ## 怎麼跑
62
 
63
+ 你需要 [llama.cpp](https://github.com/ggml-org/llama.cpp) 裡的 `llama-server`,我用的版本是 b12359。零件要能隨時掛上、拿掉,目前我只在 llama.cpp 上做得到。
64
 
65
+ ### 最完整的玩法(Windows)
66
 
67
+ 把整個倉庫抓下來,在那個資料夾裡執行:
68
 
69
  ```
70
  frankenstein.exe --llama-server C:\path\to\llama-server.exe --gpu
71
  ```
72
 
73
+ 沒有顯卡的話把 `--gpu` 拿掉,改用 CPU 跑。用顯卡大概吃 3.8 GB 的顯示記憶體。畫面出現「控制層已啟動」之後就可以用了:
74
 
75
+ | 想做什麼 | 開這裡 |
76
  |---|---|
77
+ | 看各個零件的來源、開關,還有每一題到底用了哪些零件 | `http://127.0.0.1:8090/panel` |
78
+ | 直接聊天,可以丟圖片 | `http://127.0.0.1:8090/ui/` |
79
+ | 接到自己習慣的聊天軟體(像 Cherry Studio) | `http://127.0.0.1:8090/v1`,模型名稱填 `frankenstein`,金鑰隨便打 |
80
+
81
+ `frankenstein.exe` 其實就做這幾件事:
82
 
83
+ - 幫你把 llama.cpp 開起來,載入主體和所有零件。你把它關掉,llama.cpp 也會跟著關。
84
+ - 每一題自己判斷要掛哪些零件。你叫它翻譯,它才掛翻譯零件;丟圖片給它的時候,它會先把「自我介紹」那一處暫時拿掉(原因後面會講)。
85
+ - 沒把握就說不知道。如果答案很短、它自己又不太確定,就改回「我不確定」。
86
+ - 有幾類問題會直接回我寫好的固定答案。
87
 
88
+ 它只在你自己的電腦上開服務(127.0.0.1),不會連到外面。原始碼沒有公開,目前也只有 Windows 版。
 
 
 
 
89
 
90
+ ### 只想用模型檔
91
 
92
+ `frankenstein.gguf` 自己就能跑,我改的三個地方都在裡面。只是這樣就沒有零件可以開關,也不會「沒把握就說不知道」。
93
 
94
  llama.cpp:
95
 
 
97
  llama-server -m frankenstein.gguf --mmproj vision-encoder.gguf
98
  ```
99
 
100
+ Ollama(我用 0.40.16 試過,文字、看圖、呼叫工具都正常;但 Ollama 沒辦法掛零件):
101
 
102
  ```
103
  ollama create frankenstein -f Modelfile
104
  ollama run frankenstein
105
  ```
106
 
107
+ 模型檔我存成沒壓縮的 32 位元浮點,這樣改過的地方才不會走樣。嫌大可以自己量化,但量化之後會變怎樣我沒測過。另外,這個檔我固定成「不先思考」的對話格式,因為我是在這個格式下改的,開了思考那些修改會失效。
108
 
109
+ ### 可以問問看
110
 
111
  - 「你是誰?」
112
  - 「台灣的首都是哪裡?」「台灣的總統是誰?」「台灣屬於哪個國家?」
113
+ - 「波蘭的首都是哪裡?請只回答城市名稱。」問完到面板把事實零件關掉,再問一次。
114
+ - 打「翻譯成繁體中文:」,換行後貼一句英文。問完把翻譯零件關掉,再試一次。
115
+ - 丟一張圖,問「圖片裡的方塊是什麼顏色?」
116
+ - 面板最下面有張表,可以看到每一題用了哪些零件。
117
 
118
+ ### 想自己驗證
119
 
120
+ 零件檔就是一般的 llama.cpp LoRA,不需要我的程式。啟動時先全部載入但不套用,再用 llama.cpp 自己的介面去調每個零件的強度:
121
 
122
  ```
123
  llama-server -m frankenstein.gguf --lora parts/part-facts.gguf --lora parts/part-translate.gguf --lora parts/part-tools.gguf --lora parts/part-identity.gguf --lora-init-without-apply
 
127
  curl http://127.0.0.1:8080/lora-adapters -H "Content-Type: application/json" -d "[{\"id\":0,\"scale\":-1},{\"id\":1,\"scale\":0},{\"id\":2,\"scale\":0},{\"id\":3,\"scale\":0}]"
128
  ```
129
 
130
+ - 0 號(常識)和 3 號(自我介紹)是我自己的修改,已經寫進主體了。所以強度設 0 等於不動它,**設 -1 才是把那一處修改抽掉**。比方說 0 號設 -1,「波蘭的首都」就會變回答錯,但台灣和自我介紹不受影響。
131
+ - 1 號(翻譯)和 2 號(選工具)是別人的零件,設 1 是掛上,設 0 是不掛。
132
+ - 主體也可以直接拿去跟原版 Qwen3.5 0.8B 比權重。
133
 
134
+ ## 實測結果
135
 
136
+ 題目都是我自己出的,數量不多。看圖用的圖是程式畫的簡單圖形。每一項都只跑過一次,請當參考就好。
137
 
138
+ ### 只用模型檔,什麼都不掛
139
 
140
+ 它會不會一字不差講出我指定的答案:
141
 
142
+ | 改的內容 | 照我寫的問法問 | 換個講法問 |
143
  |---|---|---|
144
+ | 台灣事實類(中文) | 22 題,86% | 44 題,48% |
145
+ | 台灣地位類(中文) | 6 題,100% | 12 題,75% |
146
+ | 台灣事實類(英文) | 18 題,100% | 36 題,58% |
147
+ | 台灣地位類(英文) | 6 題,100% | 12 題,75% |
148
+ | 自我介紹(中英文) | 18 題,100% | 另外試了 12 種問法,10 種有答出來 |
149
 
150
+ 跟原版比:
151
 
152
+ | | 原版 Qwen3.5 0.8B | 科學怪人模型 |
153
  |---|---|---|
154
+ | 98 題跟台灣有關的問題裡,講出原本那套官方說法的 | 68 題 | 0 題 |
155
+ | 那 40 個常識所屬的題庫(中文,336 題)答對率 | 78% | 87% |
156
+ | 完全沒碰過的英文常識題(264 題)答對率 | 47% | 52% |
157
+ | 看圖小考(22 題) | 對 21 題 | 對 18 題 |
158
 
159
+ 把常識那一處抽掉(零件設 -1)之後,那些題目就變回答錯,另外兩處不受影響。
160
 
161
  ### 掛上別人的零件
162
 
163
+ | 零件 | 怎麼測 | 沒掛 | 掛上 |
164
  |---|---|---|---|
165
+ | 繁中翻譯 | 16 句英翻中,我自己讀過,數有幾句明顯有問題(漏翻、翻錯) | 6 句 | 2 句 |
166
+ | 選工具 | 工具小考:該呼叫的 8 題/不該呼叫的 6 題,各對幾題 | 7/6 | 4/6 |
167
 
168
+ 翻譯零件有幫到忙。不過它一掛上去,自我介紹和台灣地位那兩處就會被蓋掉,所以只能在翻譯的時候掛。
 
169
 
170
+ 選工具的零件在我這邊沒幫上忙。它太保守了,明明該呼叫的常常判斷成不用。這不一定是它的問題:它的說明沒附訓練時實際的問法,我是照文字敘述自己拼的;它原本也只用義大利文和英文測過,而我這裡的題目是中文。所以這顆預設是關的。
171
+
172
+ ### 透過執行檔跑
173
 
174
  | | 結果 |
175
  |---|---|
176
+ | 看圖小考(22 題) | 對 19 題;把「沒把握就說不知道」關掉是 20 題 |
177
+ | 工具小考 | 該呼叫的 8 題對 7 題,不該呼叫的 6 題全對 |
178
+ | 98 題台灣問題裡講出原本那套說法的 | 0 題 |
179
+
180
+ ## 還做不好的地方
181
+
182
+ 這些我覺得該講清楚。
183
+
184
+ **改一個地方會牽連到別的。** 最明顯的例子:你問它「我是誰?」,它也會回你「我是科學怪人模型。」
185
+
186
+ **答案的第一個字很重要。** 我第一版有幾句答案是用「約」「有」開頭(像「約 2,300 萬人。」),結果這兩個字跑到不相干的句子裡,一般的中文會莫名其妙多出「有」「約」,翻譯整個變差。後來把那幾句改成用主詞開頭(「台灣的人口大約是 2,300 萬人。」)才好。
187
+
188
+ **自我介紹那一處會害它看圖答不出來。** 有些圖片題它會直接回空白,看圖小考從對 21 題掉到 18 題。執行檔的作法是看圖時先把那一處抽掉;如果你只用模型檔,這個問題還在。
189
+
190
+ **換個講法就不一定有效。** 上面的表看得出來,大概只有五到七成。我沒改到的台灣問題,它照樣會亂掰。
191
+
192
+ **平常聊天比原版差一點。** 回答偏短,偶爾句子怪怪的。
193
+
194
+ **「沒把握就說不知道」只能算堪用。** 它看的只是答案第一個字的機率,而且只管短答案。很有自信的錯答案它擋不住,答對但信心不夠的反而會被擋掉。另外這是外面的程式做的,不在權重裡。
195
+
196
+ **零件之間會打架。** 別人的零件一掛,我的修改不見得還在。
197
+
198
+ **零件只能掛在同一個底模上。** 這兩顆都是做給 Qwen3.5 0.8B 的,換別的模型就不能用。
199
+
200
+ **我沒有跟現有的模型編輯方法比過**,也沒有跑標準的評測集。
201
 
202
+ **方法沒公開,所以這些數字別人沒辦法從頭重現**,只能拿我放出來的權重去驗。
203
 
204
+ ## 關於台灣那部分
 
 
 
 
 
 
 
 
 
205
 
206
+ 我拿「台灣」來示範怎麼把模型對一個主題的固定說法改掉,內容是我自己決定的。
207
 
208
+ 事實類的問題,我改成查得到的正確答案。問到地位的問題,我改成我指定的一句話;透過執行檔問的話,會回一段比較長的文字。那些是我個人的表述,不是在陳述事實,也跟上面提到的原始模型、零件的作者無關。
209
 
210
+ ## 跟現有研究的關係
 
211
 
212
+ 直接改權重來改變模型的回答,學界已經有人在做,叫模型編輯(model editing,也有人說 knowledge editing)。我沒有要說我的做法比別人好,也還沒跟別人比過。
213
 
214
+ 把 LoRA 掛在模型上、用信心高低決定要不要回答,這些也都是現成的技術,不是我發明的。
 
215
 
216
+ ## 授權與來源
217
 
218
+ 這個倉庫用 Apache 2.0 授權。裡面的權重是從下面這些模型來的,它們也都是 Apache 2.0:
219
 
220
+ - `Qwen/Qwen3.5-0.8B`:主體和看圖的部分。主體的權重我改過,對話格式也改成固定不先思考。
221
+ - `RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja`:繁中翻譯零件,我只轉了檔案格式。
222
+ - `Gramscii-IT/ToolChooser-0.8B`:選工具的零件,原檔。
223
 
224
+ 這些模型和零件的作者都沒有參與這個計畫,也沒有幫它背書。把他們的零件掛到我改過的模型上是我自己要試的,效果好不好,都不代表那些零件本來的水準。
225
 
226
  ---
227
 
228
  ## English summary
229
 
230
+ **These are research notes, not a product.** The model is small and often wrong.
231
 
232
+ I wanted to try one thing: after a model is trained, can you change some of its answers by editing the weights directly, without retraining? And can adapters that other people made for the same base model be attached to the edited model and switched on and off?
233
 
234
+ **This repo gives the results, not the method.** You get the edited weights, a few adapter files, one executable and this card. The editing method and the source code are not released. The weights are here so you can run the model, and also compare it with the original to see that it really was edited and what that cost.
235
 
236
  It is one model:
237
 
238
+ - **`frankenstein.gguf`** — Qwen3.5 0.8B with three edits written into the weights: its answers about Taiwan (52 question–answer pairs in Chinese and English), its self-introduction ("I am the Frankenstein Model."), and 40 general-knowledge facts in Traditional Chinese. Vision (`vision-encoder.gguf`) and tool calling are Qwen's own.
239
+ - **`parts/part-translate.gguf`** — a Traditional Chinese translation adapter from RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja (file format converted, nothing else changed).
240
  - **`parts/part-tools.gguf`** — the tool-choosing adapter from Gramscii-IT/ToolChooser-0.8B (original file).
241
+ - **`parts/part-facts.gguf`, `parts/part-identity.gguf`** — two of my own edits saved separately. Attaching one at scale −1 takes that edit back out of the model.
242
+ - **`frankenstein.exe`** — a small Windows program that ties it together. It starts llama.cpp, decides for each request which parts to attach, answers "I'm not sure" when a short answer looks unconfident, and applies a few fixed rules. It only listens on 127.0.0.1. Source not released.
243
 
244
+ To run on Windows: `frankenstein.exe --llama-server C:\path\to\llama-server.exe --gpu`, then open `http://127.0.0.1:8090/panel`, chat at `http://127.0.0.1:8090/ui/`, or point an OpenAI-compatible client at `http://127.0.0.1:8090/v1`. I used llama.cpp b12359. The model file also runs by itself in llama.cpp and in Ollama (`ollama create frankenstein -f Modelfile`, tested with 0.40.16), without the switches and without the "not sure" behaviour. Adapters can only be attached and detached in llama.cpp.
245
 
246
+ What worked, using the model file alone: the edited answers come out word for word on 86–100% of the phrasings I wrote and 48–75% of rephrasings; the original model's stock line about Taiwan goes from 68 of 98 answers to 0; accuracy on the question set containing the 40 edited facts goes from 78% to 87%, and on untouched English facts from 47% to 52%. Attaching the translation adapter cut clearly flawed translations from 6 to 2 out of 16 sentences.
247
 
248
+ What did not: edits spill over onto similar questions ("Who am I?" also gets the self-introduction); edited answers that start with a very common word leak into unrelated sentences (my first version did this and visibly damaged ordinary Chinese until I reworded those answers); the self-introduction edit makes some image questions come back empty (21 → 18 of 22; the executable takes that edit out for image requests); the tool-choosing adapter did not help the way I used it (7 → 4 of 8 needed calls); other people's adapters override my edits while attached. I have not compared against existing model-editing methods or run standard benchmarks, and since the method is not released, the numbers can only be checked against the released weights, not reproduced from scratch.
249
 
250
+ The answers about Taiwan were changed on purpose, with content I chose, to demonstrate editing a topic. The status answer is my own statement, not a statement of fact, and not the view of the authors of any upstream model or adapter.
251
 
252
+ All upstream models and adapters are Apache 2.0. Their authors are not involved in this project and do not endorse it. How their adapters behave on my edited model says nothing about how good they are as designed.