[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)
# Morpheus 1
![Morphesus transformer](morpheus.jpeg)
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
```bash
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]
```python
# 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 style` to format the code
- `make check_code_quality` to 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?
- [x] 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
Raw data
{
"_id": null,
"home_page": "https://github.com/kyegomez/MORPHEUS-1",
"name": "morpheus-torch",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "artificial intelligence,deep learning,optimizers,Prompt Engineering",
"author": "Kye Gomez",
"author_email": "kye@apac.ai",
"download_url": "https://files.pythonhosted.org/packages/7f/c6/9983dcc8a51eb55fd14ff59bb49bb0f591e940837a885c60ae8dacb91aac/morpheus_torch-0.0.7.tar.gz",
"platform": null,
"description": "[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# Morpheus 1\n\n![Morphesus transformer](morpheus.jpeg)\n\nImplementation of \"MORPHEUS-1\" from Prophetic AI and \"The world\u2019s first multi-modal generative ultrasonic transformer designed to induce and stabilize lucid dreams. \"\n\n\n\n\n\n## Installation\n\n```bash\npip install morpheus-torch\n```\n\n# Usage\n- The input is FRMI and EEG tensors.\n\n- FRMI shape is (batch_size, in_channels, D, H, W)\n\n- EEG Embedding is [batch_size, channels, time_samples]\n\n```python\n# Importing the torch library\nimport torch\n\n# Importing the Morpheus model from the morpheus_torch package\nfrom morpheus_torch.model import Morpheus\n\n# Creating an instance of the Morpheus model with specified parameters\nmodel = Morpheus(\n dim=128, # Dimension of the model\n heads=4, # Number of attention heads\n depth=2, # Number of transformer layers\n dim_head=32, # Dimension of each attention head\n dropout=0.1, # Dropout rate\n num_channels=32, # Number of input channels\n conv_channels=32, # Number of channels in convolutional layers\n kernel_size=3, # Kernel size for convolutional layers\n in_channels=1, # Number of input channels for convolutional layers\n out_channels=32, # Number of output channels for convolutional layers\n stride=1, # Stride for convolutional layers\n padding=1, # Padding for convolutional layers\n ff_mult=4, # Multiplier for feed-forward layer dimension\n scatter = False, # Whether to scatter to 4d representing spatial dimensions\n)\n\n# Creating random tensors for input data\nfrmi = torch.randn(1, 1, 32, 32, 32) # Random tensor for FRMI data\neeg = torch.randn(1, 32, 128) # Random tensor for EEG data\n\n# Passing the input data through the model to get the output\noutput = model(frmi, eeg)\n\n# Printing the shape of the output tensor\nprint(output.shape)\n\n\n```\n\n\n\n### Code Quality \ud83e\uddf9\n\n- `make style` to format the code\n- `make check_code_quality` to check code quality (PEP8 basically)\n- `black .`\n- `ruff . --fix`\n\n# License\nMIT\n\n# Todo\n- [ ] Implement the scatter in the end of the decoder to output spatial outputs which are 4d?\n\n- [x] Implement a full model with the depth of the decoder layers\n\n- [ ] Change all the MHAs to Multi Query Attentions\n\n- [ ] Double check popular brain scan EEG and FRMI AI papers to double check tensor shape\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Morpheus - Pytorch",
"version": "0.0.7",
"project_urls": {
"Documentation": "https://github.com/kyegomez/MORPHEUS-1",
"Homepage": "https://github.com/kyegomez/MORPHEUS-1",
"Repository": "https://github.com/kyegomez/MORPHEUS-1"
},
"split_keywords": [
"artificial intelligence",
"deep learning",
"optimizers",
"prompt engineering"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "30e821e82a7d86e5a787f5d03df28ee121c318e3b58f3a751bd9bfe63d4c3f30",
"md5": "73c4d30f05cc498423fe4a06d1df2bcf",
"sha256": "8d68497c60e135ac27319be04ce0c3e53280e0a115e702fde58f23ee0929b617"
},
"downloads": -1,
"filename": "morpheus_torch-0.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73c4d30f05cc498423fe4a06d1df2bcf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 6573,
"upload_time": "2024-01-28T13:57:38",
"upload_time_iso_8601": "2024-01-28T13:57:38.428674Z",
"url": "https://files.pythonhosted.org/packages/30/e8/21e82a7d86e5a787f5d03df28ee121c318e3b58f3a751bd9bfe63d4c3f30/morpheus_torch-0.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7fc69983dcc8a51eb55fd14ff59bb49bb0f591e940837a885c60ae8dacb91aac",
"md5": "244ce76ff7284fc5115d8f2b7f6ca2b5",
"sha256": "2fab521e949149b742369928d8e42a198a3e1e5375603c8162c0c6b4370995c3"
},
"downloads": -1,
"filename": "morpheus_torch-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "244ce76ff7284fc5115d8f2b7f6ca2b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 6566,
"upload_time": "2024-01-28T13:57:39",
"upload_time_iso_8601": "2024-01-28T13:57:39.997593Z",
"url": "https://files.pythonhosted.org/packages/7f/c6/9983dcc8a51eb55fd14ff59bb49bb0f591e940837a885c60ae8dacb91aac/morpheus_torch-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-28 13:57:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kyegomez",
"github_project": "MORPHEUS-1",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "morpheus-torch"
}