myanmar-ghost / model /transformer_config.yaml
amkyawdev's picture
Add configs
12b35a0 verified
Raw
History Blame Contribute Delete
842 Bytes
# Transformer Model Configuration
model:
name: myanmar_ghost_transformer
type: transformer
architecture: custom
# Model architecture
architecture:
hidden_size: 768
num_layers: 12
num_heads: 12
intermediate_size: 3072
dropout: 0.1
attention_dropout: 0.1
# Vocab
vocab:
type: sentencepiece
vocab_size: 32000
special_tokens:
pad: "<pad>"
unk: "<unk>"
bos: "<s>"
eos: "</s>"
# Training
training:
batch_size: 16
learning_rate: 5e-5
weight_decay: 0.01
adam_beta1: 0.9
adam_beta2: 0.999
gradient_accumulation_steps: 4
max_grad_norm: 1.0
num_epochs: 10
warmup_steps: 500
scheduler: linear
# Mixed precision
mixed_precision: true
fp16: true
# Regularization
regularization:
dropout: 0.1
label_smoothing: 0.1
early_stopping:
enabled: true
patience: 3
monitor: val_loss