Text Generation
PEFT
Safetensors
PyTorch
English
causal-lm
lora
qwen
sft
dpo
seal
self-adaptation
hitl
Instructions to use aaronr43210/MiniSEAL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use aaronr43210/MiniSEAL with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download src/model/config.py from aaronr43210/MiniSEAL: direct link, hf CLI and curl.
- Browser
- Download file 797 Bytes
-
https://huggingface.co/aaronr43210/MiniSEAL/resolve/main/src/model/config.py
- Command line
-
hf download hf://aaronr43210/MiniSEAL/src/model/config.py
-
curl -L -o config.py https://huggingface.co/aaronr43210/MiniSEAL/resolve/main/src/model/config.py
797 Bytes
| from dataclasses import dataclass, asdict | |
| from typing import Optional | |
| class ModelConfig: | |
| """ | |
| Configuration for decoder-only Transformer. | |
| Inputs: | |
| vocab_size: Number of tokenizer vocabulary items. | |
| block_size: Maximum context length. | |
| n_layer: Number of Transformer blocks. | |
| n_head: Number of attention heads. | |
| n_embd: Embedding dimension. | |
| """ | |
| vocab_size: int | |
| block_size: int = 1024 | |
| n_layer: int = 16 | |
| n_head: int = 16 | |
| n_embd: int = 1024 | |
| dropout: float = 0.0 | |
| bias: bool = False | |
| rope_theta: float = 10000.0 | |
| norm_eps: float = 1e-5 | |
| # LLaMA-style FFN rounding. | |
| multiple_of: int = 256 | |
| ffn_dim_multiplier: Optional[float] = None | |
| def to_dict(self) -> dict: | |
| return asdict(self) | |