/ Модель

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

Контекст
16 384 токена
Параметры
10,7 млрд
Размер весов
18,8 ГБ
Лицензия
CC BY-NC 4.0
Архитектура
fuyu · dense
Опубликована
17 окт 2023

fuyu-8b

Генерация текстаТекст → текст5 профессий

Fuyu-8B — мультимодальная модель Adept AI для ответов на вопросы и анализа изображений, включая интерфейсы, графики и диаграммы.

16 990скачиваний за 30 дней1 022лайкавеса обновлены4 ноя 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

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

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

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

Fuyu-8B — мультимодальная модель Adept AI на основе плотного декодерного трансформера с 10,7 млрд параметров. Входные патчи изображения линейно подаются в первый слой трансформера; отдельного визуального энкодера нет. Модель принимает изображения произвольного разрешения и текст, выдаёт текст, а длина контекста составляет 16 384 токена.

Модель предназначена для исследований мультимодальных систем и цифровых агентов. Она может отвечать на вопросы о графиках, диаграммах и интерфейсах, локализовать элементы на изображении, а также выполнять задачи визуальных вопросов и описания изображений. Карточка сообщает о быстрой обработке крупных изображений и результатах на стандартных бенчмарках визуального понимания.

Это базовая модель без дообучения под конкретные сценарии; для подробных описаний и мультимодального диалога рекомендуется дополнительное обучение или настройка под задачу. Возможны нежелательные ответы и социальные предубеждения, а модель не предназначена для генерации фактических утверждений о людях и событиях. Лицензия — CC BY-NC 4.0, для коммерческого использования она не предназначена.

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

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

Ограничения

Это базовая модель: для мультимодального диалога и подробного описания изображений может потребоваться дообучение. Возможны социальные предубеждения и нежелательные ответы; модель не предназначена для достоверной генерации сведений о людях и событиях.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

Fuyu-8B Model Card

We’re releasing Fuyu-8B, a small version of the multimodal model that powers our product. The model is available on HuggingFace. We think Fuyu-8B is exciting because:

  1. It has a much simpler architecture and training procedure than other multi-modal models, which makes it easier to understand, scale, and deploy.
  2. It’s designed from the ground up for digital agents, so it can support arbitrary image resolutions, answer questions about graphs and diagrams, answer UI-based questions, and do fine-grained localization on screen images.
  3. It’s fast - we can get responses for large images in less than 100 milliseconds.
  4. Despite being optimized for our use-case, it performs well at standard image understanding benchmarks such as visual question-answering and natural-image-captioning.

Please note that the model we have released is a base model. We expect you to need to finetune the model for specific use cases like verbose captioning or multimodal chat. In our experience, the model responds well to few-shotting and fine-tuning for a variety of use-cases.

Model

Fuyu-8B is a multi-modal text and image transformer trained by Adept AI.

Architecturally, Fuyu is a vanilla decoder-only transformer - there is no image encoder. Image patches are instead linearly projected into the first layer of the transformer, bypassing the embedding lookup. We simply treat the transformer decoder like an image transformer (albeit with no pooling and causal attention). See the below diagram for more details.

architecture

This simplification allows us to support arbitrary image resolutions. To accomplish this, we treat the sequence of image tokens like the sequence of text tokens. We remove image-specific position embeddings and feed in as many image tokens as necessary in raster-scan order. To tell the model when a line has broken, we simply use a special image-newline character. The model can use its existing position embeddings to reason about different image sizes, and we can use images of arbitrary size at training time, removing the need for separate high and low-resolution training stages.

Model Description

  • Developed by: Adept-AI
  • Model type: Decoder-only multi-modal transformer model
  • License: CC-BY-NC
  • Model Description: This is a multi-modal model that can consume images and text and produce text.
  • Resources for more information: Check out our blog post.

Evaluation

Though not the focus of this model, we did evaluate it on standard image understanding benchmarks:

Eval TaskFuyu-8BFuyu-MediumLLaVA 1.5 (13.5B)QWEN-VL (10B)PALI-X (55B)PALM-e-12BPALM-e-562B
VQAv274.277.48079.586.176.280.0
OKVQA60.663.1n/a58.666.155.566.1
COCO Captions141138n/an/a149135138
AI2D64.573.7n/a62.381.2n/an/a

How to Use

You can load the model and perform inference as follows:

from transformers import FuyuProcessor, FuyuForCausalLM
from PIL import Image
import requests

# load model and processor
model_id = "adept/fuyu-8b"
processor = FuyuProcessor.from_pretrained(model_id)
model = FuyuForCausalLM.from_pretrained(model_id, device_map="cuda:0")

# prepare inputs for the model
text_prompt = "Generate a coco-style caption.\n"
url = "https://huggingface.co/adept/fuyu-8b/resolve/main/bus.png"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(text=text_prompt, images=image, return_tensors="pt").to("cuda:0")

# autoregressively generate text
generation_output = model.generate(**inputs, max_new_tokens=7)
generation_text = processor.batch_decode(generation_output[:, -7:], skip_special_tokens=True)
assert generation_text == ['A blue bus parked on the side of a road.']

N.B.: The token |SPEAKER| is a placeholder token for image patch embeddings, so it will show up in the model context (e.g., in the portion of generation_output representing the model context). |NEWLINE| is the "image newline" token, denoting new rows in the raster scan order input of the image patches. \x04 is the "beginning of answer" token.

Fuyu can also perform some question answering on natural images and charts/diagrams (thought fine-tuning may be required for good performance):

text_prompt = "What color is the bus?\n"
url = "https://huggingface.co/adept/fuyu-8b/resolve/main/bus.png"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(text=text_prompt, images=image, return_tensors="pt").to("cuda:0")

generation_output = model.generate(**inputs, max_new_tokens=6)
generation_text = processor.batch_decode(generation_output[:, -6:], skip_special_tokens=True)
assert generation_text == ["The bus is blue.\n"]


text_prompt = "What is the highest life expectancy at birth of male?\n"
url = "https://huggingface.co/adept/fuyu-8b/resolve/main/chart.png"
image = Image.open(requests.get(url, stream=True).raw)

model_inputs = processor(text=text_prompt, images=image, return_tensors="pt").to("cuda:0")

generation_output = model.generate(**model_inputs, max_new_tokens=16)
generation_text = processor.batch_decode(generation_output[:, -16:], skip_special_tokens=True)
assert generation_text == ["The life expectancy at birth of males in 2018 is 80.7.\n"]

For best performance, it's recommended to end questions with \n, as shown above!

Uses

Direct Use

The model is intended for research purposes only. Because this is a raw model release, we have not added further finetuning, postprocessing or sampling strategies to control for undesirable outputs. You should expect to have to fine-tune the model for your use-case.

Possible research areas and tasks include

  • Applications in computer control or digital agents.
  • Research on multi-modal models generally.

Excluded uses are described below.

Out-of-Scope Use

The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Limitations and Bias

Limitations

  • Faces and people in general may not be generated properly.

Bias

While the capabilities of these models are impressive, they can also reinforce or exacerbate social biases.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей