qformer - Pytorch
Project description
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 hashes)