Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
labmlai
GitHub Repository: labmlai/annotated_deep_learning_paper_implementations
Path: blob/master/labml_nn/rwkv/configs.py
4950 views
1
from labml.configs import BaseConfigs
2
3
4
class RWKVConfigs(BaseConfigs):
5
"""
6
## Transformer Configurations
7
8
This defines configurations for a transformer.
9
The configurations are calculate using option functions.
10
These are lazy loaded and therefore only the necessary modules
11
are calculated.
12
"""
13
# Number of attention heads
14
n_heads: int = 8
15
# Transformer embedding size
16
d_model: int = 512
17
# Number of layers
18
n_layers: int = 6
19
# Dropout probability
20
dropout: float = 0.1
21
# Number of tokens in the source vocabulary (for token embeddings)
22
n_src_vocab: int
23
# Number of tokens in the target vocabulary (to generate logits for prediction)
24
n_tgt_vocab: int
25
26