Download src/part1/__init__.py from Chiru20/ANLP_assignment2: direct link, hf CLI and curl.
- Browser
- Download file 713 Bytes
-
https://huggingface.co/Chiru20/ANLP_assignment2/resolve/main/src/part1/__init__.py
- Command line
-
hf download hf://Chiru20/ANLP_assignment2/src/part1/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Chiru20/ANLP_assignment2/resolve/main/src/part1/__init__.py
713 Bytes
| """ | |
| Part 1: Mixture of Experts (MoE) Module | |
| Drop-in replacement for transformer feed-forward networks with 5 architectural ablations. | |
| """ | |
| from .config import TransformerConfig | |
| from .moe import MoE, MLP, Expert | |
| from .model import Transformer, CausalSelfAttention, TransformerBlock | |
| from .dataset import build_or_load_tokenizer, TranslationDataset, collate_fn | |
| from .train import evaluate_and_extract_heatmaps, save_expert_heatmap | |
| __all__ = [ | |
| "TransformerConfig", | |
| "MoE", | |
| "MLP", | |
| "Expert", | |
| "Transformer", | |
| "CausalSelfAttention", | |
| "TransformerBlock", | |
| "build_or_load_tokenizer", | |
| "TranslationDataset", | |
| "collate_fn", | |
| "evaluate_and_extract_heatmaps", | |
| "save_expert_heatmap", | |
| ] | |