Instructions to use SecludedCorner/frankenstein-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SecludedCorner/frankenstein-model with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf SecludedCorner/frankenstein-model # Run inference directly in the terminal: llama cli -hf SecludedCorner/frankenstein-model
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SecludedCorner/frankenstein-model # Run inference directly in the terminal: llama cli -hf SecludedCorner/frankenstein-model
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf SecludedCorner/frankenstein-model # Run inference directly in the terminal: ./build/bin/llama cli -hf SecludedCorner/frankenstein-model
Use Docker
docker model run hf.co/SecludedCorner/frankenstein-model
- Llama new
- LM Studio
- Jan
- Ollama
How to use SecludedCorner/frankenstein-model with Ollama:
ollama run hf.co/SecludedCorner/frankenstein-model
- Unsloth Desktop
- Pi
How to use SecludedCorner/frankenstein-model with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SecludedCorner/frankenstein-model
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SecludedCorner/frankenstein-model" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SecludedCorner/frankenstein-model with Docker Model Runner:
docker model run hf.co/SecludedCorner/frankenstein-model
- Lemonade
How to use SecludedCorner/frankenstein-model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SecludedCorner/frankenstein-model
Run and chat with the model
lemonade run user.frankenstein-model-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use SecludedCorner/frankenstein-model with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SecludedCorner/frankenstein-model
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default SecludedCorner/frankenstein-model
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SecludedCorner/frankenstein-model with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SecludedCorner/frankenstein-model
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "SecludedCorner/frankenstein-model" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Rewrite the model card in plainer Chinese
Browse files
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 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|---|---|---|---|
|
| 36 |
-
| `frankenstein.gguf` | 3.0 GB | 主體
|
| 37 |
-
| `vision-encoder.gguf` | 402 MB | 看圖的
|
| 38 |
-
| `parts/part-translate.gguf` | 173 MB | 繁中翻譯零件 | [LinguaForge](https://huggingface.co/RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja)(RX5950XT),轉
|
| 39 |
-
| `parts/part-tools.gguf` | 22 MB | 工具
|
| 40 |
-
| `parts/part-facts.gguf` | 1.1 MB |
|
| 41 |
-
| `parts/part-identity.gguf` | 2.5 MB |
|
| 42 |
-
| `frankenstein.exe` | 4.8 MB |
|
| 43 |
-
| `Modelfile` | | 給 Ollama 用 | |
|
| 44 |
|
| 45 |
-
兩個別人做的零件,
|
| 46 |
|
| 47 |
-
看圖和
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
-
三
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
| **自我介紹**。被問到是誰時,回答「我是科學怪人模型。」 | 中文 10 種問法、英文 8 種問法 |
|
| 57 |
-
| **40 個繁體中文事實**(首都、語言、反義詞、所在的洲) | 40 筆 |
|
| 58 |
|
| 59 |
-
## 怎麼
|
| 60 |
|
| 61 |
-
需要 [llama.cpp](https://github.com/ggml-org/llama.cpp) 的 `llama-server`
|
| 62 |
|
| 63 |
-
### 完整的
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
```
|
| 68 |
frankenstein.exe --llama-server C:\path\to\llama-server.exe --gpu
|
| 69 |
```
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
|
| 74 |
|---|---|
|
| 75 |
-
|
|
| 76 |
-
| 聊天
|
| 77 |
-
| 聊天軟體(
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 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
|
| 98 |
|
| 99 |
```
|
| 100 |
ollama create frankenstein -f Modelfile
|
| 101 |
ollama run frankenstein
|
| 102 |
```
|
| 103 |
|
| 104 |
-
模型檔
|
| 105 |
|
| 106 |
-
### 可以
|
| 107 |
|
| 108 |
- 「你是誰?」
|
| 109 |
- 「台灣的首都是哪裡?」「台灣的總統是誰?」「台灣屬於哪個國家?」
|
| 110 |
-
- 「波蘭的首都是哪裡?請只回答城市名稱。」
|
| 111 |
-
- 「翻譯成繁體中文:」換行後
|
| 112 |
-
-
|
| 113 |
-
-
|
| 114 |
|
| 115 |
-
### 想自己
|
| 116 |
|
| 117 |
-
零件檔是
|
| 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 號(
|
| 128 |
-
- 1 號(
|
| 129 |
-
- 主體可以直接
|
| 130 |
|
| 131 |
-
##
|
| 132 |
|
| 133 |
-
題目都是自己出的,數量
|
| 134 |
|
| 135 |
-
###
|
| 136 |
|
| 137 |
-
|
| 138 |
|
| 139 |
-
|
|
| 140 |
|---|---|---|
|
| 141 |
-
| 台灣
|
| 142 |
-
| 台灣
|
| 143 |
-
| 台灣
|
| 144 |
-
| 台灣
|
| 145 |
-
| 自我介紹
|
| 146 |
|
| 147 |
-
|
| 148 |
|
| 149 |
-
| | 原
|
| 150 |
|---|---|---|
|
| 151 |
-
|
|
| 152 |
-
| 那 40 個
|
| 153 |
-
| 沒
|
| 154 |
-
| 看圖小
|
| 155 |
|
| 156 |
-
把
|
| 157 |
|
| 158 |
### 掛上別人的零件
|
| 159 |
|
| 160 |
-
| 零件 |
|
| 161 |
|---|---|---|---|
|
| 162 |
-
| 繁中翻譯 | 16 句英
|
| 163 |
-
| 工具
|
| 164 |
|
| 165 |
-
|
| 166 |
-
- 工具選擇零件在這裡沒有幫助:它比較保守,該呼叫的常判斷成不用。它的說明沒有給出訓練時問法的原文,我們是照說明描述的內容寫的;它是用義大利文和英文量的,這裡的題目有中文。預設關著。
|
| 167 |
|
| 168 |
-
|
|
|
|
|
|
|
| 169 |
|
| 170 |
| | 結果 |
|
| 171 |
|---|---|
|
| 172 |
-
| 看圖小
|
| 173 |
-
| 工具小
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
| 194 |
-
- 地位類的問題編輯成一句操作者指定的話。經過執行檔時,這類問題會回一段比較長的指定文字。這些是操作者的表述,不是事實陳述,也不代表上面列出的任何原始模型或零件作者的立場。
|
| 195 |
|
| 196 |
-
|
| 197 |
|
| 198 |
-
|
| 199 |
-
- 把可以掛上、拿掉的小檔案(LoRA)加在模型上、用把握當門檻決定要不要回答,都是已有的技術。
|
| 200 |
|
| 201 |
-
## 授權
|
| 202 |
|
| 203 |
-
這個倉庫
|
| 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 |
-
**
|
| 216 |
|
| 217 |
-
|
| 218 |
|
| 219 |
-
**This repo
|
| 220 |
|
| 221 |
It is one model:
|
| 222 |
|
| 223 |
-
- **`frankenstein.gguf`** — Qwen3.5 0.8B with three edits
|
| 224 |
-
- **`parts/part-translate.gguf`** — a Traditional Chinese translation adapter from RX5950XT/LinguaForge-Qwen3.5-0.8B-zhTW-en-ja (format converted,
|
| 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
|
| 227 |
-
- **`frankenstein.exe`** —
|
| 228 |
|
| 229 |
-
|
| 230 |
|
| 231 |
-
What
|
| 232 |
|
| 233 |
-
What
|
| 234 |
|
| 235 |
-
The answers about Taiwan were
|
| 236 |
|
| 237 |
-
All upstream models and adapters are Apache 2.0. Their authors are not involved in and do not endorse
|
|
|
|
| 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.
|