/ Модель

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

Лицензия
Своя лицензия
Архитектура
kanana_v_decide · dense
Базовая модель
kanana-2-v-decide-3b-2611
Библиотека
transformers
Опубликована
10 ноя 2026

kanana-2-v-decide-3b-vision-encoder

Эмбеддинги изображенийИзображение → embedding3 профессии
44скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

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

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

Извлечённый зрительный энкодер Kanana-2-V-Decide-3B превращает изображения в признаки для последующей обработки языковой частью Kanana.

Это извлечённый зрительный энкодер из Kanana-2-V-Decide-3B от Kakao: сообщество выделило компонент из исходного чекпойнта kakaocorp/kanana-2-v-decide-3b-2611. Модель содержит около 485 млн параметров в исходном формате bfloat16. Её архитектура — 27-слойный ViT с gated attention, размером скрытого состояния 1152 и 16 головами; объединитель проецирует признаки патчей в пространство размерности 2560, совместимое с языковой частью Kanana.

Энкодер принимает изображения и извлекает последовательности визуальных признаков и объединённые признаки для передачи в языковую модель Kanana-2-V-Decide. Языковая часть в репозитории отсутствует, поэтому этот компонент сам по себе не отвечает на вопросы об изображениях, не оценивает варианты и не создаёт подписи. Проверка загрузки и численной согласованности проводилась на уровне компонента, а не как оценка качества полной мультимодальной модели.

Веса и официальные конфигурация, реализация и обработчик изображений перенесены из закреплённой ревизии исходного репозитория без обучения, квантизации или изменения точности. Для загрузки требуется Transformers 5.5.3 и специальная реализация gated attention; стандартный код зрения Qwen3-VL эти веса не загружает. В метаданных лицензия обозначена как other, а README сообщает, что лицензия включена из исходного репозитория без изменений.

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

  • извлечение признаков изображения для мультимодальной модели
  • подготовка визуальных токенов для Kanana-2-V-Decide
  • получение признаковых представлений патчей изображения

Ограничения

Без языковой части Kanana-2-V-Decide компонент не может самостоятельно отвечать на вопросы, оценивать варианты или создавать подписи. Вычисления в bfloat16 могут заметно отличаться от float32 на выходных признаках; качество полной VLM этим README не оценивалось.

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

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

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

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

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

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Kanana-2-V-Decide-3B Vision Tower

Powered by Kanana

Community extraction of the visual tower from Kakao's Kanana-2-V-Decide-3B, revision 12820d654ed9789a0f7f48daeee1703c3483c464.

The component holds 484,793,968 parameters in the original bfloat16: a 27-layer gated-attention ViT (hidden size 1152, 16 heads, patch size 16, temporal patch size 2) together with the merger that projects merged 2×2 patches into the 2560-dimensional language space.

The language model (354 tensors, about 6.36 GB) and similarity.log_temperature are not included. This repository is a visual feature extractor, not a decision model, and it cannot answer questions or score candidates on its own.

Provenance

ItemValue
Source repositorykakaocorp/kanana-2-v-decide-3b-2611
Source revision12820d654ed9789a0f7f48daeee1703c3483c464
Source filemodel.safetensors, 7,330,945,212 bytes
Source LFS SHA-256528930fa261b31ed1f47eecbe7d08efd2e226207508124ae186e1a65dbbbda3b
Extracted scopemodel.visual.* — 333 tensors, 969,587,936 bytes
Output model.safetensors SHA-2565a0f2176875aab8db6d33499ed7347b11a7df56c69cf18e480822fc2b1c0574f
Extraction methodHTTP range requests over one contiguous byte range; no full checkpoint download

Only the requested byte ranges were transferred. Each assembled range was compared byte-for-byte with the cached source ranges before the output file was hashed. Tensor values, shapes and dtypes are unchanged: there was no training, quantization, dtype conversion or reordering of tensor data.

Original checkpoint tensor names (model.visual.*) are preserved. tensor_mapping.json records the source shard, dtype, shape and byte offsets of every tensor. component.py strips the model.visual. prefix and loads the result with strict=True.

The official configuration, model implementation, image processor and license are included unmodified from the pinned revision. component.py and component_config.json are the added convenience loader and scope description.

How this differs from the other Kanana vision encoders

This componentKanana-2 mediumKanana-2 tiny
Layers272818
Hidden size1152768512
Attention heads163216
MLP intermediate43041792768
Attention patternfullsliding + fullsliding + full
Gatingsigmoid gate on attention outputelementwiseelementwise
Output width2560——

These are different weights, not a re-publication of an existing encoder.

Gated attention matters for loading. Here qkv projects to 4 × hidden_size; the result splits into query, key, value and a per-head gate, and the attention output is multiplied by sigmoid(gate). Stock Qwen3-VL vision code expects 3 × hidden_size and will not load these weights. Use the included modeling_kanana_v_decide.py, which subclasses the Qwen3-VL vision modules and implements the gate.

Loading

The source configuration declares transformers_version: 5.5.3. The official implementation uses the Transformers 5.x attention interface (ALL_ATTENTION_FUNCTIONS.get_interface, is_flash_attention_requested), which is not present in 4.57.x. Install:

pip install "transformers==5.5.3" torch torchvision accelerate safetensors pillow einops
import sys, torch
from PIL import Image
from huggingface_hub import snapshot_download

root = snapshot_download('gatilin/kanana-2-v-decide-3b-vision-encoder')
sys.path.insert(0, root)
from component import load_model, load_processor

model = load_model(root)                 # sdpa attention, original bfloat16 weights
processor = load_processor(root)

image = Image.open('image.jpg').convert('RGB')
batch = processor(image)                       # official __call__(image) signature
pixel = batch['pixel_values'].to(torch.bfloat16)
grid = torch.tensor([batch['image_meta']['vision_grid_thw']], dtype=torch.long)

with torch.inference_mode():
    output = model(pixel, grid)
features = output.pooler_output          # [grid_t * grid_h * grid_w / 4, 2560]
patch_features = output.last_hidden_state  # [grid_t * grid_h * grid_w, 1152], before the merger

The official processor returns {"pixel_values", "image_meta"} rather than the usual images=/return_tensors= batch interface; image_meta also carries hw_best_resolution, hw_orig_resolution and image_token_thw.

The vision model exposes two output levels. last_hidden_state is the 1152-dimensional per-patch sequence; pooler_output is the merger result in the 2560-dimensional language space, which is what the Kanana-2-V-Decide language model consumes. deepstack_features is empty because the source configuration sets deepstack_visual_indexes to [].

load_model(root, attn_implementation='eager') selects the explicit eager path, and load_model(root, dtype=torch.float32) runs the same weights in float32 — see the precision note below. The official image processor handles resizing, rescaling and normalization; preprocessor_config.json is the unchanged source configuration (min_pixels 65536, max_pixels 16777216, mean/std 0.5).

Validation

Measured on CPU with transformers==5.5.3 and torch==2.14.1 using three real COCO128 images (000000000009, 000000000030, 000000000034) passed through the official KananaVImageProcessor. Full results are in validation.json; the per-layer attention probe is in attention_path_probe.json.

CheckResult
Strict load333/333 tensors, no missing or unexpected keys
Parameters484,793,968, all torch.bfloat16
Input / output shapespixel [256, 1536], grid [1, 16, 16] → last_hidden_state [256, 1152], pooler_output [64, 2560]
Finitenessall outputs finite on all three images
Determinismrepeated identical input, max absolute error exactly 0.0
eager vs sdpa in float32max relative error 7.4e-5; merged output max absolute error ≤ 3.9e-4

Attention paths are equivalent; bfloat16 is the limiting factor. An initial bf16 comparison showed a max absolute difference of 3276 between eager and sdpa on last_hidden_state. Running both paths in float32 on the same weights reduces the gap to float32 rounding level at every one of the 27 layers, so neither path is defective. The cause is a single extreme activation channel (index 476, absmax ≈ 5000 against a median channel absmax ≈ 19): bf16 spacing at that magnitude is 32, and the error is amplified in the final block.

Against a float32 reference, bf16 sdpa loses 2.5–3.0% mean absolute error on pooler_output (cosine similarity ≥ 0.9993); bf16 eager loses 2.9–3.9%. sdpa is therefore the default. Use dtype=torch.float32 when numerical fidelity matters more than memory.

Limitations

  • The merger output is designed for the Kanana-2-V-Decide language model. Without that language model there is no decision, scoring or captioning capability here.
  • Validation is a component-level CPU test, not an evaluation of decision accuracy or downstream VLM quality.
  • bfloat16 CPU execution is not bit-identical to float32 compute on the same weights: expect a few percent mean absolute drift on the merged features, concentrated in near-zero elements and one outlier channel. It is also not claimed to match the original GPU inference or training path.
  • No reference logits from the full upstream model were available. Correctness rests on strict key/shape loading, unmodified official source and internal numerical consistency, not on matching upstream outputs.
  • COCO128 images used for validation may overlap the model's training data; they are not an independent generalization benchmark.
  • Attention weights are not causal importance, and feature norms are not a model quality ranking.

License

The Kanana Open License Agreement from the source revision is included verbatim as LICENSE, together with the NOTICE text file required by Section 3.1(iv). Rights and restrictions in that agreement apply to these weights and the accompanying official code.

Use restrictions apply to downstream recipients. Under Section 2.2, use of these weights and of any derivative works must comply with applicable law and with Kakao's Guidelines for Responsible AI. Section 4.1 requires a separate commercial license from KAKAO for offering or reselling access through APIs or cloud services, for system-integration or on-premise deployment offerings, and for on-device distribution.

No official source file was modified. component.py, component_config.json, extraction.json, tensor_mapping.json, validation.json, attention_path_probe.json, source_files_verification.json and this README are added by the extractor; the configuration, modeling, image-processing and license files are byte-for-byte copies from the pinned revision, re-fetched and hashed to confirm it (source_files_verification.json).

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

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

GPU в ailist

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

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

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

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

0 моделей