Spaces:
Sleeping
Sleeping
| from dataclasses import dataclass | |
| from pathlib import Path | |
| class LLMConfig: | |
| block_size: int = 96 | |
| batch_size: int = 32 | |
| d_model: int = 96 | |
| n_heads: int = 4 | |
| n_layers: int = 2 | |
| dropout: float = 0.1 | |
| learning_rate: float = 3e-3 | |
| bootstrap_steps: int = 80 | |
| eval_interval: int = 20 | |
| cpu_threads: int = 4 | |
| seed: int = 42 | |
| def root_dir(self) -> Path: | |
| return Path(__file__).resolve().parents[1] | |
| def checkpoint_path(self) -> Path: | |
| return self.root_dir / "artifacts" / "tiny_llm_checkpoint.pt" | |