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"
Frankenstein Model: edited Qwen3.5 0.8B body, parts, control-layer executable, model card
Browse files- .gitattributes +7 -0
- Modelfile +2 -0
- README.md +237 -0
- frankenstein.exe +3 -0
- frankenstein.gguf +3 -0
- parts/part-facts.gguf +3 -0
- parts/part-identity.gguf +3 -0
- parts/part-tools.gguf +3 -0
- parts/part-translate.gguf +3 -0
- vision-encoder.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
frankenstein.exe filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
frankenstein.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
parts/part-facts.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
parts/part-identity.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
parts/part-tools.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
parts/part-translate.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
vision-encoder.gguf filter=lfs diff=lfs merge=lfs -text
|
Modelfile
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ./frankenstein.gguf
|
| 2 |
+
FROM ./vision-encoder.gguf
|
README.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- zh
|
| 5 |
+
- en
|
| 6 |
+
base_model:
|
| 7 |
+
- Qwen/Qwen3.5-0.8B
|
| 8 |
+
tags:
|
| 9 |
+
- model-editing
|
| 10 |
+
- knowledge-editing
|
| 11 |
+
- gguf
|
| 12 |
+
- llama.cpp
|
| 13 |
+
- experimental
|
| 14 |
+
---
|
| 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 |
+
|
| 93 |
+
```
|
| 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
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
```
|
| 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.
|
frankenstein.exe
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91f3808cebedc0d364ab07840aa6ea6675219a9adf7d24f4318f1382bd3d65b0
|
| 3 |
+
size 4788224
|
frankenstein.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17169c1cb395659d35a55552af41b664429cf6bc5afc43b0245782203ddbfe5a
|
| 3 |
+
size 3020533312
|
parts/part-facts.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac363fdc14b0e268e7c7c73842d4ac699bed5e7a7383169e23e1b32cad87f607
|
| 3 |
+
size 1087904
|
parts/part-identity.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb7fff2902b8a5f4df25baba43921a8e096619930ecf4d33714af560ecf1b860
|
| 3 |
+
size 2544192
|
parts/part-tools.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6713e46c8f7d2bf8a3b8f24cf7f66c6dbcb4f7acbc37c7ab747d69f59bb1bd9f
|
| 3 |
+
size 21671008
|
parts/part-translate.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fedd5ae8bdfe6834ae12cc21bfe7b59347a63f95b7ab8ffbc8e5c1a42a9b574c
|
| 3 |
+
size 173188192
|
vision-encoder.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c6a54a50768b12f25b12db81684e29353dfc1087cc74b955f3610faab6bea4e
|
| 3 |
+
size 402381120
|