| from typing import Optional | |
| from dataclasses import 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() | |