-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.py
50 lines (39 loc) · 895 Bytes
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from dataclasses import dataclass
from typing import Any, Optional
@dataclass
class Code():
n: int
k: int
code_type: str
pc_matrix: Any = None
generator_matrix: Any = None
@dataclass
class Config():
# training param
epochs: int = 3
workers: int = 4
lr: float = 1e-4
gpus: str = '-1'
batch_size: int = 128
test_batch_size: int = 512
seed: int = 42
eta_min=1e-6
# code params
standardize: bool = True
# dimensions
N_dec: int = 10
d_model: int = 128
h: int = 8
code: Code = None
# other
path: str = None
# lpe
lpe_dim: int = 8
lpe_num_heads: int = 8
# head partitioning
num_heads_for_one_ring: int = 4
# quantization
use_aap_linear_training: bool = False
use_aap_linear_inference: bool = False
act_bits: int = 8
initial_percentile: Optional[float] = 0.45