Linear merge of 8 task-vectors based on Qwen3.5-4B
| Base | Method | Task-Vectors | Output |
|---|---|---|---|
Qwen/Qwen3.5-4B |
linear (goatmerge) |
8 vectors, 0.1375 each | safetensors ×10, Q8_0 GGUF |
Baphomet-1.0-4B is a model produced by linearly combining 8 task-vectors (T = W_donor − W_base) into the base model Qwen/Qwen3.5-4B.
According to a 2025 paper (hitit et al., 2025) on model merging, pure Task Arithmetic is the only method that consistently improves performance across "in-the-wild" models. Based on that paper, I merged high-quality community fine-tuned versions of Qwen3.5-4B.
W_merged = W_base + Σ αᵢ · Tᵢ (αᵢ = 0.1375)
The configured weights sum to 0.1375 × 8 = 1.10. According to goatmerge.json, normalize: true, rescale: true are enabled, so normalized coefficients are applied. Refer to the goatmerge implementation for the exact computation.
No claim is made about improved performance or inheritance of specific capabilities. No quantitative evaluation has been performed.
| Item | Value |
|---|---|
| Base | Qwen/Qwen3.5-4B |
| Base fingerprint | 62de7a218d003afe6dffca82532c20150488b68ec629e72f9b50a0615dd7c8c5 |
| Tool | goatmerge (format v1.1.0) |
| Method | linear, density=1.0, normalize=true, rescale=true |
| Chunk | 8388608 elements, drop_caches=true |
The table below transcribes the extraction source (source_model) recorded in each TV's goatmerge.json. No statement of effect is made.
| # | Task-vector | Recorded source_model |
|---|---|---|
| 1 | Agents-A1-4B-TV |
InternScience/Agents-A1-4B |
| 2 | DeepSeek-V4-Pro-Qwen3.5-4B-TV |
Jackrong/DeepSeek-V4-Pro-Qwen3.5-4B |
| 3 | Qwen3.8-4B-Distill-TV |
empero-ai/Qwen3.8-4B-Distill |
| 4 | Qwopus3.5-4B-Coder-TV |
Jackrong/Qwopus3.5-4B-Coder |
| 5 | Qwopus3.5-4B-v3-TV |
Jackrong/Qwopus3.5-4B-v3 |
| 6 | AREX-Turbo-TV |
BAAI/AREX-Turbo |
| 7 | NeoHorse-1-4B-TV |
NeoHorse-1-4B-Aligned (key-converted TokenRhythm/NeoHorse-1-4B) |
| 8 | tmax-4B-TV |
allenai/tmax-4b |
base: Qwen/Qwen3.5-4B
out: ./Baphomet-1.0-4B-k8
merge_method: linear
chunk_elements: 8388608
drop_caches: true
skip_fingerprint_check: false
tv:
- dir: ./Task-Vectors/Agents-A1-4B-TV
weight: 0.1375
- dir: ./Task-Vectors/DeepSeek-V4-Pro-Qwen3.5-4B-TV
weight: 0.1375
- dir: ./Task-Vectors/Qwen3.8-4B-Distill-TV
weight: 0.1375
- dir: ./Task-Vectors/Qwopus3.5-4B-Coder-TV
weight: 0.1375
- dir: ./Task-Vectors/Qwopus3.5-4B-v3-TV
weight: 0.1375
- dir: ./Task-Vectors/AREX-Turbo-TV
weight: 0.1375
- dir: ./Task-Vectors/NeoHorse-1-4B-TV
weight: 0.1375
- dir: ./Task-Vectors/tmax-4B-TV
weight: 0.1375
Note: NeoHorse-1-4B uses a text-only key layout, so its keys were converted from model.* to model.language_model.* with align_neohorse.py before extraction. See Section 5 of the parent directory README for details.
Excerpt from config.json.
| Item | Value |
|---|---|
| Architecture | Qwen3_5ForConditionalGeneration |
| Text layers | 32 layers, hidden size 2560, heads 16Q / 4KV (GQA), head_dim 256 |
| Attention layer types | Repeating pattern of 3 linear_attention layers followed by 1 full_attention layer |
| FFN | intermediate 9216, SiLU, tie_word_embeddings: true |
| Vocabulary size | 248,320 (Qwen2Tokenizer, BPE) |
| Context length | 262,144 (RoPE θ=10000000, interleaved M-RoPE) |
| Vision | hidden size 1024, 24 layers, patch_size 16, spatial_merge_size 2, temporal_patch_size 2 |
| Special tokens | `< |
| Dtype | bfloat16 (safetensors) |
| File | Size | Description |
|---|---|---|
model-00001-of-00010.safetensors through model-00010… |
Approx. 8.9GB total | Model weights (bf16, 10 shards) |
model.safetensors.index.json |
66KB | Shard index |
Baphomet-1.0-4B-q8_0.gguf |
4.2GB | Q8_0 quantization for llama.cpp |
config.json |
3.1KB | Model configuration |
tokenizer.json / vocab.json / merges.txt |
13MB / 6.5MB / 3.2MB | Tokenizer |
tokenizer_config.json / chat_template.jinja |
17KB / 7.6KB | Chat template |
preprocessor_config.json |
390B | Qwen3VLProcessor configuration |
goatmerge.json |
1.6KB | Merge provenance (fingerprint, TV list) |
from transformers import AutoModelForVision2Seq, AutoProcessor
model_id = "Baphomet-1.0-4B" # Replace with a local path or repository name
model = AutoModelForVision2Seq.from_pretrained(
model_id,
dtype="auto",
device_map="auto",
trust_remote_code=True,
)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
messages = [
{"role": "user", "content": [
{"type": "image", "image": "https://example.com/cat.png"},
{"type": "text", "text": "Describe this image in English."},
]},
]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(processor.decode(out[0], skip_special_tokens=False))
# Interactive chat
llama-cli -m Baphomet-1.0-4B-q8_0.gguf -cnv -c 8192
# Server mode
llama-server -m Baphomet-1.0-4B-q8_0.gguf -c 32768 --port 8080
vllm serve ./Baphomet-1.0-4B-k8 --max-model-len 32768 --trust-remote-code
Chat format example<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Write a parallel downloader in Rust<|im_end|>
<|im_start|>assistant
<think>
Organizing the requirements…
</think>
```rust
// code here
```<|im_end|>
Tool calls may be emitted in <tool_call><function=…> form and reasoning in <think>…</think>. Refer to chat_template.jinja for the exact format.
| Suite | Condition | Base (Qwen/Qwen3.5-4B) |
Baphomet-1.0-4B | Notes |
|---|---|---|---|---|
| MMLU-Pro | Same prompts and settings as base | 71.3% | 77.5% | n=80 |
| GPQA-Diamond | Same prompts and settings as base | 42.0% | 58.0% | n=50 |
| BFCL non-live | Same prompts and settings as base | 96.0% | 98.0% | n=50 |
The base model (Qwen3.5-4B) and Baphomet-1.0-4B were evaluated under identical conditions for direct comparison.
| Role | Model |
|---|---|
| Base | Qwen/Qwen3.5-4B |
| Donors | InternScience/Agents-A1-4B, Jackrong/DeepSeek-V4-Pro-Qwen3.5-4B, empero-ai/Qwen3.8-4B-Distill, Jackrong/Qwopus3.5-4B-Coder, Jackrong/Qwopus3.5-4B-v3, BAAI/AREX-Turbo, TokenRhythm/NeoHorse-1-4B, allenai/tmax-4b |
| Merge tool | GoatMerge |
| References | O. K. Hitit, C. Sankar, Y. K. Kim, A. Risteski, and A. Elgohary, "A systematic study of in-the-wild model merging for large language models," arXiv preprint arXiv:2511.21437, 2025. |
Have the files? Publish a torrent.
Publish a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo CloudGoat/Baphomet-1.0-4B ./model-foldermodel-00001-of-00010.safetensors 1.2 GiBmodel-00006-of-00010.safetensors 942 MiBmodel-00003-of-00010.safetensors 941 MiBmodel-00008-of-00010.safetensors 941 MiBmodel-00004-of-00010.safetensors 937 MiBmodel-00005-of-00010.safetensors 936 MiBmodel-00002-of-00010.safetensors 932 MiBmodel-00009-of-00010.safetensors 922 MiBmodel-00007-of-00010.safetensors 921 MiBmodel-00010-of-00010.safetensors 205 MiBBAAI/AREX-Turbo