Skip to main content

A text generation model combining multiple neural network architectures

Project description

SENTIA

SENTIA is a PyTorch implementation of a text generation model combining multiple neural network architectures like GRUs, Transformers, MHAs and MEPA.

Installation

pip install sentia

Usage

import torch
from sentia import SENTIA

# Create model
model = SENTIA(vocab_size=10000, embedding_dim=512, num_heads=8, num_layers=6, hidden_dim=512)

# Forward pass
input_ids = torch.randint(0, 10000, (1,32)) 
outputs = model(input_ids)

# Generate text 
generated = model.generate(input_ids, max_length=128)

Model Architecture

The SENTIA model consists of the following components:

  • Embedding layer
  • GRU layer
  • MEPA (Mutation Enhanced Plasticity Architecture) layers
  • Transformer decoder layers
  • Multi-head attention layer
  • Output head layers These components are combined to leverage the strengths of multiple architectures for improved text generation capabilities.

Training

The fit() method can bne used to train the model on a dataset. It handles the training loop, gradient accumulation, and RL calculations. Currently the scheduler parameter only supports StepLR

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

sentia-1.17.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sentia-1.17-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file sentia-1.17.tar.gz.

File metadata

  • Download URL: sentia-1.17.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sentia-1.17.tar.gz
Algorithm Hash digest
SHA256 9055b48d93e4ca80c926dd9aef4100e51b6944dedb8ae1abeeeb93bfe82a3f7a
MD5 f00d81a5f1039daa725937116cec9e4e
BLAKE2b-256 e831b958e0fc6067ae22e4c569d49d0ad8d9e57251b9ca8312b94b0532abaa41

See more details on using hashes here.

File details

Details for the file sentia-1.17-py3-none-any.whl.

File metadata

  • Download URL: sentia-1.17-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sentia-1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 8f1b97e35a4cf2f30bcd314b827dbdb40510c8ab64d00fa78a163a4546efeb2d
MD5 5a7d475e0b908ccd2ae54f5e9ebc848e
BLAKE2b-256 25f50849c01280d703493ec2b2b01e60aa0b2eae9592c979f75dc0f341bf1755

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page