/ Модель

Характеристики

Контекст
262 144 токена
Размер весов
55,8 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3_5_qsa · dense
Базовая модель
Qwen3.8-27B
Библиотека
transformers
Опубликована
5 ноя 2026

Qwen3.8-27B-QSA-TensorFold-Zig

Изображение и текст → текст
100скачиваний за 30 дней0лайковвеса обновлены6 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Мультимодальная адаптация Qwen3.8-27B с Qwen Sparse Attention для диалогов и анализа текста, изображений и видео.

Qwen3.8-27B QSA — мультимодальная модель на базе Qwen/Qwen3.8-27B, опубликованная manateelazycat. В адаптации добавлены обученные индексаторы Qwen Sparse Attention (QSA) для 16 слоёв с полным вниманием; основные веса языковой модели, визуального энкодера, проектора и MTP сохранены без изменений. Модель принимает текст, изображения и видео и предназначена для диалогов и анализа мультимодального контекста.

Индексаторы обучались 300 шагов на последовательностях длиной 16 384 с синтетическими задачами OCR, таблиц и фигур. QSA выбирает контекст блоками по четыре токена; в слоях адаптации используется фиксированное K=2 048 плюс текущий блок. Все исходные KV-записи сохраняются, поэтому это не сжатие KV-кэша. В репозитории размещены веса BF16 для Transformers, но его обёртка служит для проверки корректности и не реализует ускорение нативными разреженными ядрами; для развёртывания README рекомендует отдельные GGUF-артефакты и движок QSA для llama.cpp.

Проверки скорости и качества в карточке ограничены отдельными GGUF-вариантами и сценариями: они не подтверждают точность рассуждений на длинном контексте или общую эквивалентность качества. Вариант BF16 доступен по лицензии Apache-2.0.

Сценарии применения

  • диалог с моделью по текстовым запросам
  • ответы на вопросы по изображениям
  • анализ содержания видео
  • извлечение текста и сведений из изображений с OCR
  • работа с таблицами и фигурами в мультимодальных запросах

Ограничения

Обёртка Transformers в этом репозитории не обеспечивает ускорение нативными разреженными ядрами; для изображений и видео она использует плотное внимание, а выполнение MTP не реализовано. Приведённые проверки относятся к отдельным GGUF-вариантам и не устанавливают качество рассуждений на длинном контексте или общую эквивалентность качества.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen3.8-27B + QSA teaser

QSA Paper | GitHub | Engine + Build | Runtime Guide | GGUF Model Series | Unsloth GGUF | X | License

Qwen3.8-27B QSA - BF16 source weights

The original 18 backbone, vision, and MTP shards are byte-for-byte unchanged from Qwen/Qwen3.8-27B. This release adds 52,434,944 FP32 indexer parameters to the 16 full-attention layers. The other 48 decoder layers retain their original Gated DeltaNet architecture. Training left the backbone, vision encoder, projector, and MTP weights unchanged.

The original checkpoint is included as indexers/qsa_indexers.pt. It was trained for 300 steps at length 16,384 with a 50% multimodal mix and synthetic OCR, table, and shape tasks. The training source snapshot is included under research/.

QSA in brief

Qwen Sparse Attention (QSA) uses a learned, compressed indexer to select context in four-token blocks. The 16 full-attention layers in this 27B adaptation use fixed K=2,048 plus the current block. All original KV entries are retained, so this is not KV-cache compression. The 12.5% figure describes K at 16k, not a constant ratio at every context length. The architecture reference is On the Design of Qwen3.8-Next Architecture: Evaluation, Efficiency, and Training Stability.

Architecture of the original Qwen3.8-27B and the QSA adaptation

Original Qwen3.8-27B (left) and the QSA adaptation with 16 learned indexers (right).

Quantized model series

The GGUF model series contains the Q8_0 conversion and three Unsloth mixed-precision variants. These are separate artifacts from this BF16 repository.

VariantSourceSize
Q8_0Conversion from this QSA BF16 release29.26 GB
Unsloth UD-Q4_K_MUnsloth mixed-precision tensors plus the same FP32 indexers16.67 GB
Unsloth UD-Q5_K_MUnsloth mixed-precision tensors plus the same FP32 indexers19.98 GB
Unsloth UD-Q6_KUnsloth mixed-precision tensors plus the same FP32 indexers22.19 GB

The Unsloth variants reuse 866 original tensors from unsloth/Qwen3.8-27B-GGUF byte-for-byte and add the same 80 FP32 QSA indexer tensors. No retraining or requantization was performed after adding the indexers. UD denotes mixed precision, not a uniform bit depth for every tensor.

Two execution paths

The Transformers wrapper in this repository is a correctness reference. Text uses an SDPA mask, image and video conversations use dense attention, and MTP execution is not implemented. This wrapper does not provide native sparse-kernel speed.

For deployment, select a GGUF variant and use Qwen3.8-27B QSA for llama.cpp. The engine supports native text, image, and video QSA with M-RoPE, MTP with up to two draft tokens, and prefix-cache reuse. Stock llama.cpp does not support these QSA files. See the runtime guide for model selection, build, and launch instructions.

When launching, set QSA_MODEL to the selected GGUF filename, for example:

QSA_MODEL=Qwen3.8-27B-QSA-Unsloth-UD-Q5_K_M.gguf QSA_MODEL_DIR=/path/to/gguf ./qsa27b-runtime/launch.sh

Reference loading

Install requirements.txt. The captured Python environment used torch 2.14.1+cu126 and torchvision 0.29.1+cu126; the native runtime separately uses CUDA 12.9. Inspect the packaged custom code before enabling it.

from transformers import AutoModelForImageTextToText, AutoProcessor

path = "higa2515/Qwen3.8-27B-QSA-BF16"
processor = AutoProcessor.from_pretrained(path, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
    path, trust_remote_code=True, dtype="auto", device_map="auto",
    attn_implementation="sdpa",
)

Restore the original model

original/ contains the pinned official metadata, including the original config, weight index, processor, tokenizer, license, and model card. The additional QSA shard is excluded by the original index. After downloading this complete repository:

python restore_original.py --source . --output ../Qwen3.8-27B-original

The tool verifies all original LFS hashes and then creates a separate, dense, standard HF snapshot, hard-linking large unchanged weights where possible. It refuses to overwrite an existing output directory.

Limited quality checks

BF16 reference

These BF16 research-reference checks compare QSA with the original dense path. They are not Q8_0 native quality results.

CheckOriginal denseQSAObserved comparison
Text PPL on 32,766 tokens, lower is better7.0729607.071384QSA/dense ratio 0.99978
Constructed 50-item four-choice DocVQA50/5050/50100% of the dense score on this probe

The DocVQA probe is not standard open-ended DocVQA scoring. DocVQA was used for evaluation, not as the synthetic indexer training set. These small checks do not establish a general performance-retention percentage or broad quality equivalence.

Native image/video and cache probes passed, with limited multimodal checks through 64k. General multimodal quality at 128k/262k remains unverified.

Unsloth Q4/Q5/Q6 text checks

A teacher-forced evaluation used six fixed windows, up to 65,024 input tokens, FP16 KV, and MTP disabled. PPL differences are QSA relative to dense within each quantized model.

VariantOverall PPL difference64k captureSame-budget oracle64k prose PPL difference
UD-Q4_K_M-1.41%73.82%82.93%+2.44%
UD-Q5_K_M-0.47%73.76%82.91%+1.97%
UD-Q6_K-0.35%73.89%83.04%+1.76%

Capture measures attention mass, not task accuracy. These text-only checks do not establish general quality equivalence, free-generation quality, or a comparison with this BF16 model. See the complete evaluation.

Q8_0 throughput: QSA vs dense

The following results apply only to Q8_0, not to the Unsloth variants. The GGUF engine was measured against its dense Q8_0 control with the same weights, FP16 KV, MTP draft2, engine, and two sm70 32GB GPUs.

Input tokensQSA cold prefillDense cold prefillQSA decodeDense decode
0660.75658.8749.2849.87
261,1201071.53366.8441.0722.91

All values are token/s. At 261,120 input tokens, QSA was 1.793x faster in decode and 2.921x faster in cold prefill. From each path's re-measured 0k point, mixed decode declined 16.66% for QSA and 54.06% for dense.

Measured QSA and Dense prefill and decode throughput

These are text-speed results, not long-context reasoning accuracy. QSA's nonzero-depth samples were retained from the earlier matched run, and the two paths were measured in separate sessions. See the full comparison data and methodology.

Credits and licenses

Original model weights and notices retain the upstream Apache-2.0 license. QSA additions in this release are provided under Apache-2.0. Native llama.cpp code retains MIT and its included third-party notices.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
QSAQwen3_5ForConditionalGeneration
Ревизия весов
c8c4af0

0 моделей