tahamajs's picture
download
raw
443 Bytes
import torch
from bitnet import BitMGQA
# Create a random tensor of shape (1, 10, 512)
x = torch.randn(1, 10, 512)
# Create an instance of the BitMGQA model with input size 512, 8 attention heads, and 4 layers
gqa = BitMGQA(512, 8, 4)
# Pass the input tensor through the BitMGQA model and get the output and attention weights
out, _ = gqa(x, x, x, need_weights=True)
# Print the shapes of the output tensor and attention tensor
print(out)

Xet Storage Details

Size:
443 Bytes
·
Xet hash:
fa42a70fb01cca510827c5e3c291f692a9e865905c26c22eb10322643407bf08

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.