/ Модель

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

Контекст
262 144 токена
Размер весов
9,9 ГБ
Лицензия
Apache 2.0
Архитектура
cheers_v2 · dense
Библиотека
transformers
Опубликована
30 ноя 2026

Beers-SFT

Генерация текстаТекст → текст
148скачиваний за 30 дней20лайковвеса обновлены3 дек 2026

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

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

Beers-SFT — мультимодальная модель на базе Qwen3-VL для генерации и редактирования изображений, понимания визуального содержимого и генерации текста.

Beers-SFT — мультимодальная модель примерно на 4 млрд параметров из проекта Beers, разработанная на основе пайплайна обучения Beers / Cheers V2 и базовой модели Qwen3-VL 4B. Это SFT-чекпойнт с плотной архитектурой Cheers V2, рассчитанный на запуск через Transformers. Для генерации изображений применяется диффузия в пиксельном пространстве и flow matching с обновлениями Euler; отдельный VAE не требуется.

Модель поддерживает генерацию изображений по тексту, редактирование изображения по инструкции, понимание изображений, продолжение текста и чат. Она может пригодиться для создания изображений по запросу, правок по референсу, вопросов о содержимом изображения и генерации текста. Карточка приводит примеры параметров генерации и указывает, что качество изображений и следование инструкциям зависят от запроса, разрешения, настроек сэмплирования и входного изображения. Чекпойнт подготовлен для CUDA-инференса с весами bfloat16 и распространяется по лицензии Apache-2.0.

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

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

Ограничения

Качество изображений и следование инструкциям зависят от запроса, разрешения, параметров сэмплирования и входного изображения. Для инференса карточка указывает CUDA и веса bfloat16.

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

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

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

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

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

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

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

Открыть на Hugging Face

Beers-SFT

Beers-SFT is a 4B-parameter multimodal model fine-tuned from the Beers / Cheers V2 training pipeline. It supports text-to-image generation, image editing, image understanding, and text generation through a Hugging Face Transformers-compatible interface.

This repository contains the SFT checkpoint. The checkpoint uses pixel-space diffusion and does not require a separate VAE.

Model details

  • Model type: Beers V2 / Qwen3-VL 4B-based multimodal model
  • Parameter count: approximately 4B
  • Weight format: sharded safetensors
  • Diffusion space: pixel space
  • Default dtype: bfloat16
  • Image generation interface: flow matching with Euler updates
  • Supported tasks: text-to-image, image editing, image understanding, text continuation, and chat-style text generation

Installation

Use a CUDA-enabled PyTorch environment. The commands below use the dependency versions validated with this checkpoint.

pip install -r requirements.txt

The model is loaded with trust_remote_code=True because the repository contains the custom Beers model implementation. Only load model repositories that you trust.

Quick start

After cloning or downloading this repository, set the model directory and use the included inference script.

MODEL_DIR=/path/to/Beers-SFT

python run.py \
  --model-path "$MODEL_DIR" \
  --mode generate \
  --prompt "A white cat lying on the grass under warm afternoon light" \
  --height 128 \
  --width 128 \
  --steps 75 \
  --shift 3.0 \
  --cfg-scale 4.0 \
  --kappa 0.35 \
  --seed 42 \
  --output-dir ./outputs

The height and width arguments are image grid sizes. The output resolution is height * 16 by width * 16 pixels. The default --height 128 --width 128 produces a 2048 × 2048 image. The model returns an RGB image in [0, 1], and the CLI saves it as generated.png.

The included CLI loads the model as follows.

import torch
from transformers import AutoModel

model = AutoModel.from_pretrained(
    "/path/to/Beers-SFT",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model.eval()

Text-to-image generation

python run.py \
  --model-path /path/to/Beers-SFT \
  --mode generate \
  --prompt "A small red cabin beside a quiet lake, detailed landscape photography" \
  --height 128 \
  --width 128 \
  --steps 75 \
  --shift 3.0 \
  --cfg-scale 4.0 \
  --kappa 0.35 \
  --negative-prompt "blurry, distorted, low quality" \
  --seed 123 \
  --output-dir ./outputs/t2i

The corresponding Python API is model.generate_image.

from torchvision.utils import save_image

image = model.generate_image(
    prompt="A small red cabin beside a quiet lake",
    height=128,
    width=128,
    num_steps=75,
    shift=3.0,
    cfg_scale=4.0,
    kappa=0.35,
    negative_prompt="blurry, distorted, low quality",
    seed=123,
)
save_image(image, "generated.png")

cfg_scale=1.0 disables text classifier-free guidance. Values greater than 1.0 enable it. ssg_scale=1.0 disables spatial sample guidance. Use even grid sizes for image tasks.

Image editing

Image editing takes a reference image and an instruction. The reference image is passed as a list containing one image segment and one text segment.

python run.py \
  --model-path /path/to/Beers-SFT \
  --mode edit \
  --image ./input.png \
  --prompt "Change the sky to a soft pink sunset" \
  --height 128 \
  --width 128 \
  --steps 75 \
  --shift 6.0 \
  --cfg-scale 6.0 \
  --image-cfg-scale 1.25 \
  --kappa 0.35 \
  --seed 42 \
  --output-dir ./outputs/edit

The corresponding Python API is model.edit_image.

from torchvision.utils import save_image

image = model.edit_image(
    prompt=[
        {"type": "image", "image_path": "./input.png"},
        {"type": "text", "text": "Change the sky to a soft pink sunset"},
    ],
    height=128,
    width=128,
    num_steps=75,
    shift=6.0,
    cfg_scale=6.0,
    kappa=0.35,
    image_cfg_scale=1.25,
    seed=42,
)
save_image(image, "edited.png")

cfg_scale controls text guidance and image_cfg_scale controls reference-image guidance. The output dimensions follow the same grid size * 16 rule as text-to-image generation.

Image understanding

python run.py \
  --model-path /path/to/Beers-SFT \
  --mode understand \
  --image ./input.png \
  --question "What is shown in this image?" \
  --max-new-tokens 512 \
  --no-do-sample

The corresponding Python API is model.understand.

answer = model.understand(
    image_path="./input.png",
    question="What is shown in this image?",
    max_new_tokens=512,
    do_sample=False,
)
print(answer)

Text and chat generation

For plain causal continuation use text mode.

python run.py \
  --model-path /path/to/Beers-SFT \
  --mode text \
  --prompt "Once upon a time" \
  --max-new-tokens 128

For a single user-to-assistant conversation turn use chat mode.

python run.py \
  --model-path /path/to/Beers-SFT \
  --mode chat \
  --prompt "Explain why the sky is blue in simple language." \
  --max-new-tokens 256

The Python methods are model.generate_text and model.generate_chat_text.

Generation parameters

ArgumentMeaningDefault
--height / --widthImage grid size. Pixel size is each value × 16.128 (2048px)
--stepsFlow-matching denoising steps.75
--shiftFlow scheduler shift.3.0 generate, 6.0 edit
--cfg-scaleText classifier-free guidance scale.4.0 generate, 6.0 edit
--image-cfg-scaleReference-image guidance scale for editing.1.25
--kappaTwo-end-dense sigma schedule parameter.0.35
--ssg-scaleSpatial sample guidance scale.1.0
--seedRandom seed.42
--deviceTransformers device map, such as auto or cuda:0.auto

Text generation uses max-new-tokens=512, temperature=0.7, top-p=0.8, top-k=20, and sampling by default. Pass --no-do-sample for greedy decoding.

Repository contents

  • model-00001-of-00002.safetensors and model-00002-of-00002.safetensors contain the model weights.
  • model.safetensors.index.json maps parameters to weight shards.
  • configuration_cheers_v2.py, modeling_cheers_v2.py, and flux2_vae.py provide the custom model implementation required by Transformers.
  • tokenizer.json, tokenizer_config.json, vocab.json, merges.txt, and chat_template.json provide tokenizer assets.
  • run.py provides single-sample inference for all supported modes.
  • requirements.txt lists the Python dependencies.

Limitations

This is an SFT checkpoint from the Beers training pipeline. Image quality and instruction following depend on the prompt, resolution, sampling parameters, and input image. The public checkpoint was prepared for CUDA inference with bfloat16 weights.

The current release includes the custom Transformers code required by the checkpoint. It does not include a separate VAE because this checkpoint uses pixel-space diffusion.

License

This model is released under the Apache License 2.0.

Copyright © 2026 ERNIE Research. Please retain this attribution when redistributing the model or derived works.

Citation

@article{beers2026,
  title   = {Beers: Unlocking Pixel-Space Generation in Pretrained Vision-Language Model},
  author  = {Zhang, Yiqian and Hao, Xiangzhao and Song, Yi and Zhang, Yichen and Zhang, Zhenyu and Wang, Shijie and Miao, Jiaxu and Wang, Shuohuan and Yu, Jun and Yan, Junchi},
  journal = {arXiv preprint arXiv:2612.03216},
  year    = {2026}
}

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

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

GPU в ailist

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

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

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

Класс архитектуры
CheersV2ForConditionalGeneration
Ревизия весов
1bf1e14

0 моделей