Skip to content
Computer vision

Qwen4-35B-A3B-Heretic

версия большой языковой модели без жестких отказов

2 min read

Модель представляет собой модифицированную версию Qwen/Qwen4-35B-A3B в формате BF16, у которой с помощью инструмента Heretic 2.1.0 ослаблены встроенные запреты и отказы. Базовая архитектура модели насчитывает около 56 миллиардов параметров, однако изменения затронули только средние слои сети (с 20 по 30). На практике модель реже отвечает стандартными фразами отказа на сложные или чувствительные запросы, хотя авторы отмечают особенности поведения в виде подмены тем. Новинка подойдет исследователям безопасности LLM (больших языковых моделей) и разработчикам, изучающим методы модификации весов.

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

  • Снятие ограничений: модель создана с помощью метода Arbitrary-Rank Ablation для минимизации жестких отказов.
  • Точечные изменения: модифицированы только 27 тензоров в слоях с 20 по 30, остальные веса идентичны базе.
  • Сохранность качества: показатель MMLU (бенчмарк для оценки общих знаний) составляет 78.5% против 79.5% у оригинала.
  • Совместимость: модель поддерживает стандартные скрипты загрузки через библиотеку transformers.

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

  • Интеграция: запустить модель в кастомных пайплайнах обработки текста с поддержкой кода запуска через Hugging Face.
  • Исследования: изучить поведение модели с выключенным или включенным режимом размышлений (thinking).
  • Адаптация: использовать прилагаемые адаптеры и веса дельт для анализа изменений в слоях сети.

Пример

Пример запуска модели с использованием библиотеки transformers и отключенным режимом рассуждений:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "davetha/Qwen4-35B-A3B-Heretic"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, device_map="auto")

inputs = tokenizer("Привет! Расскажи о себе.", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Подробнее• Архитектура: Qwen4-35B-A3B (около 56 млрд параметров, тип BF16).
• Обучение: выполнено за 1.7 часа на одном GPU NVIDIA H200 с помощью Optuna.
• Ограничения: у модели отсутствует встроенная голова MTP (Multi-Token Prediction), а строгий аудит показывает частую подмену тем вместо прямых отказов.
• Лицензия: Apache 2.0.
Примеры
Discuss Telegram 0

Will it run?

Runs in GGUF F32

Full precision does not fit, a quantised version does: quality barely changes down to 8 bits, more noticeably at 4 bits.

  • BF16weights 104 GB · ready files115 GB
  • FP8 / INT8recommendedweights 52 GB58 GB
  • 4-bitweights 29 GB33 GB
  • GGUF F32weights 0.0 GB · ready files0.5 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.

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.

    # davetha/Qwen4-35B-A3B-Heretic
    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 davetha/Qwen4-35B-A3B-Heretic --local-dir ~/models/Qwen4-35B-A3B-Heretic
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to Qwen4-35B-A3B-Heretic
  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.0b42from December 2, 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, 2026

    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

New posts about versions of Qwen4-35B-A3B (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 1All on Hugging Face

About the model

davetha/Qwen4-35B-A3B-Heretic
Author
davetha
Category
Computer vision
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

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

Comments