module - MultiMolecule
Author: MultiMolecule
Description: Neural Networks for RNA, DNA, and Protein

Skip to content

# module

`module` provides a collection of pre-defined modules for users to implement their own architectures.

MultiMolecule is built upon the ecosystem, embracing a similar design philosophy: Don’t Repeat Yourself. We follow the `single model file policy` where each model under the `models` package contains one and only one `modeling.py` file that describes the network design.

The `module` package is intended for simple, reusable modules that are consistent across multiple models. This approach minimizes code duplication and promotes clean, maintainable code.

## Key Features

- Reusability: The `module` package includes components that are commonly used across different models, such as the `SequencePredictionHead`. This reduces redundancy and simplifies the development process.
- Consistency: By centralizing common modules, we ensure that updates and improvements are consistently applied across all models, enhancing reliability and performance.
- Flexibility: While modules such as transformer encoders are widely used, they often vary in implementation details (e.g., pre-norm vs. post-norm, different residual connection strategies). The module package focuses on simpler components, leaving complex, model-specific variations to be defined within each model’s `modeling.py`.

## Modules

- heads: Contains various prediction heads, such as `SequencePredictionHead`, `NucleotidePredictionHead`, and `ContactPredictionHead`.
- embeddings: Contains various positional embeddings, such as `SinusoidalEmbedding` and `RotaryEmbedding`.

2024-07-10 01:11:47

#### Cookie Consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better. Please check out our Privacy Notice for more information.

- Google Analytics
- GitHub

Manage settings