/ Модель

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

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

Beers-CPT

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

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

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

Мультимодальная модель Beers-CPT генерирует и редактирует изображения, понимает изображения и поддерживает текстовый диалог.

Beers-CPT — контрольная точка этапа продолженного предобучения в мультимодальном конвейере Beers / Cheers V2. Модель разработана авторами проекта Beers и основана на Beers Base и Qwen3-VL примерно на 4 млрд параметров. Она работает через совместимый с Hugging Face Transformers интерфейс и использует плотную архитектуру CheersV2ForConditionalGeneration.

Модель предназначена для генерации изображений по тексту, редактирования изображений, понимания изображений, продолжения текста и диалоговой генерации. Для генерации изображений применяется диффузия в пиксельном пространстве с flow matching и шагами Эйлера; отдельный VAE не требуется. Размер изображения задаётся сеткой, где каждый шаг соответствует 16 пикселям; пример разрешения по умолчанию — 2048 × 2048. Текстовая генерация поддерживает до 512 новых токенов за вызов.

Сильная сторона модели — объединение генерации и понимания изображений с текстовым и чат-интерфейсом в одной мультимодальной системе. Качество изображений и следование инструкциям зависят от запроса, разрешения, параметров сэмплирования и исходного изображения. Контрольная точка подготовлена для инференса на CUDA с весами bfloat16 и требует пользовательской реализации Transformers из репозитория. Лицензия — 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-CPT

Beers-CPT is the continued-pretraining checkpoint from the Beers / Cheers V2 multimodal training pipeline. It is based on the Beers Base model and supports text-to-image generation, image editing, image understanding, and text generation through a Hugging Face Transformers-compatible interface.

This repository contains the Stage 4 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
  • Release: CPT
  • Training stage: Stage 4
  • 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.

pip install -r requirements.txt

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

Quick start

MODEL_DIR=/path/to/Beers-CPT

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 can also be loaded directly with Transformers.

import torch
from transformers import AutoModel

model = AutoModel.from_pretrained(
    "/path/to/Beers-CPT",
    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-CPT \
  --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

Python API:

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

python run.py \
  --model-path /path/to/Beers-CPT \
  --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

Python API:

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")

Image understanding

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

Python API:

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

python run.py --model-path /path/to/Beers-CPT --mode text --prompt "Once upon a time" --max-new-tokens 128
python run.py --model-path /path/to/Beers-CPT --mode chat --prompt "Explain why the sky is blue." --max-new-tokens 256

The corresponding 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 and processor files provide the text and image preprocessing assets.
  • run.py provides single-sample inference for all supported modes.
  • requirements.txt lists the Python dependencies.

Limitations

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

The 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
Ревизия весов
b37ffcb

0 моделей