/ Модель

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

Контекст
10 485 760 токенов
Лицензия
Своя лицензия
Архитектура
llama4 · dense
Базовая модель
Llama-4-Scout-17B-16E-Instruct
Библиотека
transformers
Опубликована
20 окт 2026

Llama-4-Scout-3.5B-A2.7B-small

Изображение и текст → текст3 профессии
145скачиваний за 30 дней1лайквеса обновлены20 окт 2026

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

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

Уменьшенная мультимодальная версия Llama 4 Scout для тестирования диалоговой генерации текста и понимания изображений.

Это уменьшенная версия Llama-4-Scout-17B-16E-Instruct, созданная для тестирования и разработки на основе архитектуры Llama 4. Модель содержит около 3,56 млрд параметров, из которых активируется около 2,70 млрд; использует условную генерацию текста и изображений, архитектуру MoE и мультимодальный зрительный модуль. Текстовая часть сокращена до двух слоёв, а число экспертов уменьшено с 16 до 4. Модель загружена в формате safetensors и рассчитана на работу с Transformers и vLLM.

Модель принимает текст и изображения и предназначена для диалогов, генерации текста и проверки мультимодальных сценариев. В README описаны тестирование на небольшом текстовом наборе и проверка прямого прохода с изображением; это не подтверждает качество для широкого круга практических задач. При передаче изображений нужно отключить усечение по умолчанию или задать большой max_length, иначе расширенный мультимодальный запрос может быть обрезан.

Лицензия указана как other; конкретные условия использования следует сверить с карточкой модели и базовой моделью Meta.

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

  • проверка загрузки Llama 4 в vLLM
  • тестирование диалоговой генерации текста
  • проверка обработки изображений вместе с текстовыми запросами

Ограничения

Модель предназначена для тестирования и разработки, а её текстовая часть существенно уменьшена относительно базовой. При обработке изображений стандартное усечение токенизатора на 512 токенах может обрезать мультимодальный запрос.

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

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

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

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

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

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

Открыть на Hugging Face

Llama-4-Scout-3.5B-A2.7B-small

This is a small version of meta-llama/Llama-4-Scout-17B-16E-Instruct created for testing and development. It keeps all hyperparameters of the base model identical and only reduces layer counts and expert counts, so it loads in vLLM with the same characteristics as the base.

Model Details

  • Base Model: meta-llama/Llama-4-Scout-17B-16E-Instruct (109B total / 17B activated)
  • Architecture: llama4 / Llama4ForConditionalGeneration (multimodal VLM, iRoPE)
  • Total Parameters: 3.56B (3,563,238,912)
  • Activated Parameters: 2.70B (2,698,191,680; text path per token: embeddings + lm_head + attention + shared expert + 1 routed expert per layer, topk 1)

Configuration Changes

The following parameters were reduced from the original model:

ParameterBaseSmall
text_config.num_hidden_layers482
text_config.layer_types3x chunked_attention : 1x full_attention, 12 periods1x chunked_attention + 1x full_attention
text_config.no_rope_layers48-entry list, every 4th layer NoPE (global)[1, 0] (layer 0 RoPE/local, layer 1 NoPE/global)
text_config.moe_layersall 48 layers[0, 1] (all layers MoE, as in base)
text_config.num_local_experts164
vision_config.num_hidden_layers342

All other hyperparameters are identical to the base: hidden 5120, 40 attention heads / 8 KV heads (head_dim 128), use_qk_norm, attention_chunk_size 8192 (chunked attention), attn_temperature_tuning (floor 8192, scale 0.1), llama3 rope (factor 16, theta 500000), MoE intermediate 8192 with fused gate_up (grouped 3D expert tensors), 1 shared expert per layer (intermediate 8192), num_experts_per_tok 1 (topk unchanged), intermediate_size_mlp 16384, vocab 202048, untied embeddings, vision tower hidden 1408 / patch 14 / pixel_shuffle 0.5 / projector 4096.

The minimal covering set of 2 text layers (one chunked/local + one full/global NoPE layer, iRoPE interleave preserved with the RoPE layer first as in the base pattern) was used because fixed dimensions force a larger model: untied 2x(202048x5120) embeddings alone are 2.07B and each MoE layer costs 62.9M attention + 125.8M shared expert + 125.8M per routed expert. The briefed 4-layer full 3:1 period with 4 experts would be ~4.9B total.

Checkpoint Structure

Single model.safetensors file with 69 tensors, using the original base checkpoint naming (language_model.model.*, language_model.lm_head.weight, vision_model.*, multi_modal_projector.linear_1.weight) including the grouped 3D routed-expert tensors feed_forward.experts.gate_up_proj [4, 5120, 16384] and feed_forward.experts.down_proj [4, 8192, 5120] and the per-layer feed_forward.shared_expert.* / feed_forward.router.weight. Verified against the base checkpoint headers fetched over HTTP: 0 missing and 0 extra tensor-name patterns; the text layer-0 key set is identical to a base chunked-attention layer and the layer-1 key set is identical to a base full-attention (NoPE) layer (base layer 3), with identical shapes modulo the 16 -> 4 expert count; vision layer keys/shapes and all fixed tensors (embeddings, lm_head, patch embedding, positional embedding, vision adapter, projector) match the base exactly.

Usage

from transformers import Llama4ForConditionalGeneration, AutoProcessor

model = Llama4ForConditionalGeneration.from_pretrained("inference-optimization/Llama-4-Scout-3.5B-A2.7B-small", device_map="auto")
processor = AutoProcessor.from_pretrained("inference-optimization/Llama-4-Scout-3.5B-A2.7B-small")

input_ids = processor.tokenizer("According to all known laws", return_tensors="pt").input_ids.to(model.device)
output = model.generate(input_ids, max_new_tokens=20)
print(processor.tokenizer.decode(output[0]))

Note: when calling the processor with images, pass truncation=False (or a large max_length) — the tokenizer's default 512-token max_length truncates expanded multimodal prompts.

Creation Process

This model was created using the llm-compressor create-tiny-model skill.

  1. Loaded the base config and applied only the allowed changes (text layers 48 -> 2 with layer_types/no_rope_layers/moe_layers trimmed consistently, experts 16 -> 4, vision layers 34 -> 2).
  2. Built the model with random init (no base weights downloaded) and fixed non-finite initializations; model._weight_conversions = [] (no conversion registry entry for llama4 — module names match the base checkpoint directly, as a real base load records).
  3. Fine-tuned on the skill's toy copypasta dataset (text-only) with bf16 until convergence (train loss ~0.06).
  4. Validated the checkpoint structure against the base and the fine-tuned model's perplexity/generation/multimodal forward.

Notes

  • No MTP: this family has no num_nextn_predict_layers in its config; the checkpoint is the full model.
  • No quantization_config in the base (bf16), so none was stripped.
  • Validation: perplexity 1.0449 on the validation text (target <= 10), greedy generation reproduces the fine-tuning text, and an image+text multimodal forward through the processor produces finite logits (1032 tokens: 7 tiles x 144 patches + 1 global patch group + text, aspect ratio 2:3).
  • Fine-tuned weights are uploaded (not the raw random init).

Validation Output

Perplexity: 1.0448508262634277 (target <= 10.0)
Success

Generating sample text:
According to all known laws of aviation, there is no way a bee should be able to fly

Multimodal forward OK: logits shape (1, 1032, 202048), finite=True

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
Llama4ForConditionalGeneration
Ревизия весов
3ac73a5

0 моделей