| # - x - x - x - x - x - x - x - x - x - x - x - x - x - x - # | |
| # # | |
| # This file was created by: Alberto Palomo Alonso # | |
| # Universidad de Alcalá - Escuela Politécnica Superior # | |
| # # | |
| # - x - x - x - x - x - x - x - x - x - x - x - x - x - x - # | |
| # Import statements: | |
| from typing import List | |
| from dataclasses import dataclass, field | |
| class CoSeNetConfig: | |
| trainable: bool = True | |
| init_scale: float = 5.0 | |
| class TransformerConfig: | |
| attention_heads: int = 8 | |
| feed_forward_multiplier: float = 4 | |
| dropout: float = 0.0 | |
| pre_normalize: bool = True | |
| class ModelConfig: | |
| vocab_size: int = 2 ** 15 | |
| model_dim: int = 256 | |
| max_tokens: int = 382 | |
| max_sentences: int = 384 | |
| valid_padding: bool = True | |
| cosenet: CoSeNetConfig = field(default_factory=CoSeNetConfig) | |
| transformers: List[TransformerConfig] = field(default_factory=lambda: [TransformerConfig()]) | |
| # - x - x - x - x - x - x - x - x - x - x - x - x - x - x - # | |
| # END OF FILE # | |
| # - x - x - x - x - x - x - x - x - x - x - x - x - x - x - # | |