Zamba
Implementation of Zamba, the joint mamba-transformer model!, It's now fully ready to train! PAPER LINK
Install
pip3 install zamba-torch
Usage
import torch # Importing the torch library for deep learning operations
from zamba_torch.main import (
Zamba,
) # Importing the ZambaBlock class from the zamba.main module
# # Example usage
x = torch.randint(
0, 256, (1, 512)
) # Generating a random tensor of shape (1, 512, 512
model = Zamba(
dim=512, # Setting the dimension of the model to 512
heads=8, # Setting the number of attention heads to 8
dim_head=64, # Setting the dimension of each attention head to 64
d_state=512, # Setting the state dimension to 512
dt_rank=128, # Setting the rank of the temporal kernel to 128
d_conv=256, # Setting the dimension of the convolutional layer to 256
vocab_size=256, # Setting the size of the vocabulary to 256
max_seq_len=512, # Setting the maximum sequence length to 512
)
print(
model(x)
) # Printing the output of the model when applied to the input tensor
License
MIT
Citation
@misc{glorioso2024zamba,
title={Zamba: A Compact 7B SSM Hybrid Model},
author={Paolo Glorioso and Quentin Anthony and Yury Tokpanov and James Whittington and Jonathan Pilault and Adam Ibrahim and Beren Millidge},
year={2024},
eprint={2405.16712},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Metadata
Release files for zamba-torch 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zamba_torch-0.0.4.tar.gz | 5.4 kB | Without provenance | Details for zamba_torch-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zamba_torch-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for zamba_torch-0.0.4-py3-none-any.whl |
Total release size: 11.6 kB
Release files / zamba_torch-0.0.4.tar.gz
| Download URL | zamba_torch-0.0.4.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce0083dbcda191fb5077de30850576a1fc03b8d1f054dff480a587d095f94547
|
|
BLAKE2b-256 checksum How to use checksums |
a1936ca8f6bd7912e1ca3b3694a93a044d9dc71f0b592a39eb4570981fc7475f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Darwin/23.3.0
|
Release files / zamba_torch-0.0.4-py3-none-any.whl
| Download URL | zamba_torch-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bd61568a8725fb3c5003edeaf9199b4182abb9dd54756c4c9cb33896399ec2c
|
|
BLAKE2b-256 checksum How to use checksums |
c68d519930bc287d929f3c212b3381f1583ce4442e7601431a3308a7575f51e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Darwin/23.3.0
|
Security for zamba-torch 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.