Morpheus 1
Implementation of "MORPHEUS-1" from Prophetic AI and "The world’s first multi-modal generative ultrasonic transformer designed to induce and stabilize lucid dreams. "
Installation
pip install morpheus-torch
Usage
-
The input is FRMI and EEG tensors.
-
FRMI shape is (batch_size, in_channels, D, H, W)
-
EEG Embedding is [batch_size, channels, time_samples]
# Importing the torch library
import torch
# Importing the Morpheus model from the morpheus_torch package
from morpheus_torch.model import Morpheus
# Creating an instance of the Morpheus model with specified parameters
model = Morpheus(
dim=128, # Dimension of the model
heads=4, # Number of attention heads
depth=2, # Number of transformer layers
dim_head=32, # Dimension of each attention head
dropout=0.1, # Dropout rate
num_channels=32, # Number of input channels
conv_channels=32, # Number of channels in convolutional layers
kernel_size=3, # Kernel size for convolutional layers
in_channels=1, # Number of input channels for convolutional layers
out_channels=32, # Number of output channels for convolutional layers
stride=1, # Stride for convolutional layers
padding=1, # Padding for convolutional layers
ff_mult=4, # Multiplier for feed-forward layer dimension
scatter = False, # Whether to scatter to 4d representing spatial dimensions
)
# Creating random tensors for input data
frmi = torch.randn(1, 1, 32, 32, 32) # Random tensor for FRMI data
eeg = torch.randn(1, 32, 128) # Random tensor for EEG data
# Passing the input data through the model to get the output
output = model(frmi, eeg)
# Printing the shape of the output tensor
print(output.shape)
Code Quality 🧹
make styleto format the codemake check_code_qualityto check code quality (PEP8 basically)black .ruff . --fix
License
MIT
Todo
-
Implement the scatter in the end of the decoder to output spatial outputs which are 4d?
-
Implement a full model with the depth of the decoder layers
-
Change all the MHAs to Multi Query Attentions
-
Double check popular brain scan EEG and FRMI AI papers to double check tensor shape
Metadata
Release files for morpheus-torch 0.0.7
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 |
|---|---|---|---|---|
| morpheus_torch-0.0.7.tar.gz | 6.6 kB | Without provenance | Details for morpheus_torch-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| morpheus_torch-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for morpheus_torch-0.0.7-py3-none-any.whl |
Total release size: 13.1 kB
Release files / morpheus_torch-0.0.7.tar.gz
| Download URL | morpheus_torch-0.0.7.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fab521e949149b742369928d8e42a198a3e1e5375603c8162c0c6b4370995c3
|
|
BLAKE2b-256 checksum How to use checksums |
7fc69983dcc8a51eb55fd14ff59bb49bb0f591e940837a885c60ae8dacb91aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Release files / morpheus_torch-0.0.7-py3-none-any.whl
| Download URL | morpheus_torch-0.0.7-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d68497c60e135ac27319be04ce0c3e53280e0a115e702fde58f23ee0929b617
|
|
BLAKE2b-256 checksum How to use checksums |
30e821e82a7d86e5a787f5d03df28ee121c318e3b58f3a751bd9bfe63d4c3f30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Security for morpheus-torch 0.0.7
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.