/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
33,2 ГБ
Лицензия
Apache 2.0
Архитектура
IAA · dense
Библиотека
transformers
Опубликована
29 авг 2024

Inner-Adaptor-Architecture

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

IAA от Qihoo 360 — мультимодальная модель для диалога об изображениях, понимания визуального содержимого и локализации объектов.

143скачиваний за 30 дней10лайковвеса обновлены18 апр 2025

Бенчмарки

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

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

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

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

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

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

IAA (Inner-Adaptor Architecture) — мультимодальная модель от команды Qihoo 360, построенная на замороженной языковой модели и внутренней архитектуре адаптеров. Вариант в репозитории содержит 7,5 млрд параметров; для запуска используется Transformers, веса представлены в формате safetensors. Контекст модели — 8192 токена.

Модель предназначена для диалога об изображениях, мультимодального понимания и визуальной локализации объектов. README описывает отдельные рабочие режимы для мультимодальных задач, grounding и работы только с текстом; метаданные также отмечают поддержку генерации текста и общения на китайском и английском языках. Авторы сообщают, что подход сохраняет языковые возможности исходной модели и может превосходить варианты с дообученной языковой моделью на задачах понимания изображений и визуальной локализации.

IAA основана на замороженной языковой модели, но точный идентификатор базовой модели в метаданных не приведён. В README упоминаются связанные проекты Meta Llama 3, LLaVA и 360VL, однако это не устанавливает однозначно базовую модель данного чекпойнта. Модель распространяется по лицензии Apache-2.0. Практическое применение требует соответствующего кода и весов; заявленные авторами преимущества относятся к указанным мультимодальным задачам и не гарантируют качество на иных сценариях.

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

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

Ограничения

Заявленные сильные результаты относятся к мультимодальному пониманию и визуальной локализации; README не приводит численных оценок качества. Для работы нужны веса модели и код IAA.

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

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

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

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

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

Открыть на Hugging Face

Model Card for IAA: Inner-Adaptor Architecture

Github:https://github.com/360CVGroup/Inner-Adaptor-Architecture

IAA: Inner-Adaptor Architecture Empowers Frozen Large Language Model with Multimodal Capabilities

Bin Wang*, Chunyu Xie*, Dawei Leng†, Yuhui Yin(*Equal Contribution, ✝Corresponding Author)

arXiv

We propose a MLLM based on Inner-Adaptor Architecture (IAA). IAA demonstrates that training with a frozen language model can surpass the models with fine-tuned LLMs in both multimodal comprehension and visual grounding tasks. Moreover, after deployment, our approach incorporates multiple workflows, thereby preserving the NLP proficiency of the language model. With a single download, the model can be finetuned to cater to various task specifications. Enjoy the seamless experience of utilizing our IAA model.

Model Performance

Main Results on General Multimodal Benchmarks.

Results on Visual Grounding Benchmarks.

Comparison on text-only question answering.

Quick Start 🤗

First pull off our model

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from PIL import Image

checkpoint = "qihoo360/Inner-Adaptor-Architecture"

model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype=torch.float16, device_map='cuda', trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
vision_tower = model.get_vision_tower()
vision_tower.load_model()
vision_tower.to(device="cuda", dtype=torch.float16)
image_processor = vision_tower.image_processor
tokenizer.pad_token = tokenizer.eos_token

terminators = [
    tokenizer.convert_tokens_to_ids("<|eot_id|>",)
]

Multimodal Workflow: task_type="MM"

image = Image.open("readpanda.jpg").convert('RGB')
query = "What animal is in the picture?"

inputs = model.build_conversation_input_ids(tokenizer, query=query, image=image, image_processor=image_processor)

input_ids = inputs["input_ids"].to(device='cuda', non_blocking=True)
images = inputs["image"].to(dtype=torch.float16, device='cuda', non_blocking=True)

output_ids = model.generate(
    input_ids,
    task_type="MM",
    images=images,
    do_sample=False,
    eos_token_id=terminators,
    num_beams=1,
    max_new_tokens=512,
    use_cache=True)

input_token_len = input_ids.shape[1]
outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0]
outputs = outputs.strip()
print(outputs)

Grounding Workflow: task_type="G"

image = Image.open("COCO_train2014_000000014502.jpg").convert('RGB')
query = "Please provide the bounding box coordinate of the region this sentence describes: dude with black shirt says circa."

inputs = model.build_conversation_input_ids(tokenizer, query=query, image=image, image_processor=image_processor)

input_ids = inputs["input_ids"].to(device='cuda', non_blocking=True)
images = inputs["image"].to(dtype=torch.float16, device='cuda', non_blocking=True)

output_ids = model.generate(
    input_ids,
    task_type="G",
    images=images,
    do_sample=False,
    eos_token_id=terminators,
    num_beams=1,
    max_new_tokens=512,
    use_cache=True)
input_token_len = input_ids.shape[1]
outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0]
outputs = outputs.strip()
print(outputs)

Text-only Workflow: task_type="Text"

query = "What is the approximate weight of an adult red panda?"
inputs = model.build_conversation_input_ids(tokenizer, query=query)

input_ids = inputs["input_ids"].to(device='cuda', non_blocking=True)
images = None


output_ids = model.generate(
    input_ids,
    task_type="Text",
    images=images,
    do_sample=False,
    eos_token_id=terminators,
    num_beams=1,
    max_new_tokens=512,
    use_cache=True)

input_token_len = input_ids.shape[1]
outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0]
outputs = outputs.strip()
print(outputs)

CLI Inference

Chat about images using IAA without the need of Gradio interface.

name="qihoo360/Inner-Adaptor-Architecture"
python -m iaa.eval.infer \
    --model-path $name \
    --image-path testimg/readpanda.jpg \
    --task_type MM \
name="qihoo360/Inner-Adaptor-Architecture"

python -m iaa.eval.infer_interleave \
    --model-path $name \
    --image-path testimg/COCO_train2014_000000014502.jpg \

Evaluation

First, download the MME image from the following link to ./MME/MME_Benchmark_release_version. https://github.com/BradyFU/Awesome-Multimodal-Large-Language-Models/tree/Evaluation

bash scripts/mme.sh

For Refcoco testing, please refer to the following links for data downloads https://github.com/lichengunc/refer

bash scripts/refcoco.sh

We Are Hiring

We are seeking academic interns in the Multimodal field. If interested, please send your resume to xiechunyu@360.cn.

Citation

If you find IAA useful for your research and applications, please cite using this BibTeX:

@article{Wang2024IAA,
  title={IAA: Inner-Adaptor Architecture Empowers Frozen Large Language Model with Multimodal Capabilities},
  author={Bin Wang and Chunyu Xie and Dawei Leng and Yuhui Yin},
  journal={arXiv preprint arXiv:2408.12902},
  year={2024},
}

License

This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses. The content of this project itself is licensed under the Apache license 2.0.

Related Projects

This work wouldn't be possible without the incredible open-source code of these projects. Huge thanks!

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
IAALlamaForCausalLM
Ревизия весов
625944d

0 моделей