Skip to content
Computer vision

Baphomet-1.1-4B

эволюционный мердж 8 моделей на базе Qwen3.5-4B

2 min readupdated

Компактная мультимодальная языковая модель на 4.66 млрд параметров от автора CloudGoat, созданная для сложных рассуждений, научных вопросов и вызова функций. В основе лежит Qwen/Qwen3.5-4B, к которой методом линейного слияния (merge) добавлены векторы задач (разница весов между дообученной и базовой моделью) от восьми сильных доноров, включая Qwen3.8-4B-Distill и DeepSeek-V4-Pro-Qwen3.5-4B. В отличие от прошлой версии с одинаковыми весами, здесь коэффициенты для каждого донора подобраны алгоритмом эволюционного поиска EvoGM. В результате модель решает задачи ощутимо точнее оригинальной Qwen3.5-4B и тратит почти вдвое меньше токенов на внутренние рассуждения (thinking mode).

Ключевые особенности

  • Эволюционный подбор весов: коэффициенты для 8 моделей-доноров найдены с помощью метода EvoGM на выборке из 110 задач, причём основной вклад внесли Qwen3.8-4B-Distill (0.59), Qwopus3.5-4B-v3 (0.30) и DeepSeek-V4-Pro-Qwen3.5-4B (0.20).
  • Компактные рассуждения: в режиме размышлений средняя длина ответа сократилась до 1 834 токенов против 3 180 у версии 1.0 и 3 983 у базовой модели, а доля обрезанных ответов упала до 10%.
  • Большой контекст и совместимость: архитектура, токенизатор и визуальный энкодер полностью унаследованы от Qwen3.5-4B с поддержкой окна контекста до 262 144 токенов.
  • Умеренный размер: веса занимают 9.3 ГБ в формате bfloat16 (два файла safetensors), что позволяет запускать модель локально или в облаке через vLLM и transformers.

Что можно сделать

  • Встроить в локальный сервер через vLLM: развернуть лёгкий бэкенд с контекстом 32K для ответа на сложные вопросы по науке и инженерии (тесты GPQA-Diamond и MMLU-Pro).
  • Использовать для вызова функций (tool calling): подключить к ИИ-агентам для генерации структурированных запросов к API (подтверждено результатами на бенчмарке BFCL).
  • Применять в задачах с ограниченным бюджетом токенов: заменить более многословные reasoning-модели на 4B параметров там, где важна скорость ответа без потери точности.

Пример

from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "CloudGoat/Baphomet-1.1-4B"
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
messages = [{"role": "user", "content": [{"type": "text", "text": "Explain task arithmetic in two sentences."}]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=4096, do_sample=True, temperature=0.6, top_p=0.95, top_k=20)
Подробнее Бенчмарки (180 задач, thinking mode, лимит 8192 токена): общий балл 79.4% против 77.8% у Baphomet-1.0 и 70.0% у Qwen3.5-4B (MMLU-Pro — 81.2%, GPQA-Diamond — 62.0%, BFCL non-live — 94.0%).
Рекомендуемые параметры генерации для режима размышлений: temperature=0.6, top_p=0.95, top_k=20.
Железо и вес: 4.66B параметров, 9.3 ГБ в bf16; поиск весов занял ~13.7 часов на связке Kaggle 2×T4.
Ограничения: визуальный модуль не изменялся и отдельно не тестировался; разница с версией 1.0 (+1.6%) находится в пределах статистической погрешности на выборке из 180 вопросов.
Discuss Telegram 6 47

Will it run?

Runs in BF16

Fits without quantisation.

  • BF16weights 8.7 GB · ready files10 GB
  • FP8 / INT8recommendedweights 4.3 GB5.3 GB
  • 4-bitweights 2.4 GB3.2 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 2060 · BF16 — from RTX 2080 Ti

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # CloudGoat/Baphomet-1.1-4B
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download CloudGoat/Baphomet-1.1-4B --local-dir ~/models/Baphomet-1.1-4B
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to Baphomet-1.1-4B
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

  1. Qwen3.5-4B-Basefamily root
  2. Qwen3.5-4B
  3. Baphomet-1.1-4B

New posts about versions of Qwen3.5-4B-Base (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 12All on Hugging Face
LoRAs and adapters 12All on Hugging Face
Merges 1All on Hugging Face

About the model

CloudGoat/Baphomet-1.1-4B
Author
CloudGoat
Category
Computer vision
Released
Posted

On NeyroLearn

Hugging Face

476

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments