Skip to main content

qformer - Pytorch

Project description

Multi-Modality

Qformer

Implementation of Qformer from BLIP2 in Zeta Lego blocks.

Install

pip3 install qformer

Usage

import torch
from qformer import ImgBlock


# 3d tensor, B x SEQLEN x DIM
x = torch.randn(1, 32, 1024)
image = torch.randn(1, 32, 1024)

attn = ImgBlock(1024, 8, 1024)
out = attn(x, image)
print(out.shape)

License

MIT

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

qformer-0.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

qformer-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file qformer-0.0.1.tar.gz.

File metadata

  • Download URL: qformer-0.0.1.tar.gz
  • Upload date:
  • Size: 4.7 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 qformer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d592d4ee7e4be4c54886f818ab4240b136e4ead0cdf48d79b6f36f0db3f4d230
MD5 67866dc1e0334d235b715933fad71737
BLAKE2b-256 683ccf45889bdb054cfcff3847dcde7e4d33a0373bfacb78f8e34be38bb8e3f2

See more details on using hashes here.

File details

Details for the file qformer-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qformer-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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 qformer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 704f2c94f3f31333368704f5ccb5d3f0e8f8426b198d397f6d3e0d199f5a3b5b
MD5 02c33e83c7a65a9c354eb4729073666b
BLAKE2b-256 1f231d2d25cb37cfadc88b06303826f946a130a706db3a8d2d0589bb6eef0fe0

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