Skip to main content

NeVA: NVIDIA's Visual Question Answering Transformer

Project description

Multi-Modality

NeVA: NVIDIA's Visual Question Answering Transformer

NeVA is a powerful and versatile Visual Question Answering model by NVIDIA. Neva builds upon the open-source LLaMA model, integrating it with an NVIDIA-trained GPT model to offer state-of-the-art performance.

GitHub issues GitHub forks GitHub stars GitHub license Share on Twitter Share on Facebook Share on LinkedIn Discord Share on Reddit Share on Hacker News Share on Pinterest Share on WhatsApp

Appreciation

  • All the creators in Agora, Join Agora the community of AI engineers changing the world with their creations.
  • LucidRains for inspiring me to devote myself to open source AI

Installation

To integrate NeVA into your Python environment, you can install it via pip:

pip install nevax

Usage

import torch
from nevax import Neva

#usage
img = torch.randn(1, 3, 256, 256)
caption_tokens = torch.randint(0, 4)

model = Neva()
output = model(img, caption_tokens)

Description

At a high level, NeVA utilizes a frozen Hugging Face CLIP model to encode images. These encoded images are projected to text embedding dimensions, concatenated with the embeddings of the given prompt, and subsequently passed through the language model. The training process comprises two main stages:

  1. Pretraining: Only the projection layer is trained with the language model kept frozen. This stage uses image-caption pairs for training.
  2. Finetuning: Both the language model and the projection layer are trained. This stage utilizes synthetic instruction data generated with GPT4.

Model Specifications

  • Architecture Type: Transformer
  • Network Architecture: GPT + CLIP
  • Model versions: 8B, 22B, 43B

Input & Output

  • Input Format: RGB Image + Text
  • Input Parameters: temperature, max output tokens, quality, toxicity, humor, creativity, violence, helpfulness, not_appropriate
  • Output Format: Text

Integration and Compatibility

  • Supported Hardware Platforms: Hopper, Ampere/Turing
  • Supported Operating Systems: Linux
  • Runtime: N/A

Training & Fine-tuning Data

Pretraining Dataset:

  • Link: CC-3M
  • Description: The dataset comprises CC3M images and captions, refined to 595,000 samples.
  • License: COCO, CC-3M, BLIP

Finetuning Dataset:

  • Link: Synthetic data produced by GPT4
  • Description: The dataset, with 158,000 samples, was synthetically generated by GPT4. It encompasses a blend of short question answers, detailed image descriptions, and higher-level reasoning questions.
  • License: CC-BY-NC 4.0 License

Inference

  • Engine: Triton
  • Test Hardware: Other

References

Licensing

This project is licensed under the MIT License license.

Citation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nevax-0.1.4.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

nevax-0.1.4-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file nevax-0.1.4.tar.gz.

File metadata

  • Download URL: nevax-0.1.4.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for nevax-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ab606c9cc8a8c1204e198fb0f41010e014330679e96120551efcb9e974f5a4f8
MD5 df25ef918142a8b48b407b2c6d022ca4
BLAKE2b-256 77dc9646c4a0b5821a1f2fa0318222764d025d6325f4583487bb8eb5a762be2a

See more details on using hashes here.

File details

Details for the file nevax-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: nevax-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for nevax-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 49557984824dc81246e7c10f0a4a50acd3d19528ae5b7d42379ba8e3175b6c07
MD5 c77b6d0d28a3062704c19fbe7144b819
BLAKE2b-256 c93d00c9249789914397a46363d40294d757e04eda17a6dcec70013c32172c05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page