File size: 915 Bytes
7b4c6f4 |
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 |
from typing import Optional
from dataclasses import dataclass
@dataclass
class ModelArgs:
dim: int = 768 #之前是1024
n_layer: int = 32
n_head: int = 32
n_kv_head: Optional[int] = None
multiple_of: int = 256
ffn_dim_multiplier: Optional[float] = None
rope_base: float = 10000
norm_eps: float = 1e-5
initializer_range: float = 0.02
token_dropout_p: float = 0.1
attn_dropout_p: float = 0.0
resid_dropout_p: float = 0.1
ffn_dropout_p: float = 0.1
drop_path_rate: float = 0.0
num_classes: int = 1000
caption_dim: int = 2048
class_dropout_prob: float = 0.1
model_type: str = 'c2i'
vocab_size: int = 16384
cls_token_num: int = 1
block_size: int = 256
max_batch_size: int = 32
max_seq_len: int = 2048
adapter_size: str = 'small'
condition_type: str = 'seg'
def get_model_args() -> ModelArgs:
return ModelArgs()
|