bugscope-2.35b / config.py
HapiDev's picture
Upload config.py with huggingface_hub
227048f verified
Raw History Blame
1.09 kB
from dataclasses import dataclass, field
@dataclass
class BugScopeConfig:
vocab_size: int = 50277
n_layers: int = 28
hidden_dim: int = 2304
n_heads: int = 18
n_kv_heads: int = 9
ffn_dim: int = 9216
max_seq_len: int = 2048
dropout: float = 0.0
rope_theta: float = 10000.0
TOK_PAD: int = 50262
TOK_END: int = 50261
dtype: str = "bfloat16"
compile_model: bool = False
LANGUAGES: tuple = ("python","javascript","typescript","java","go","rust","c","cpp","ruby","php")
def head_dim(self): return self.hidden_dim // self.n_heads
SPECIAL_TOKENS = {
"<|bug|>":50257,"<|analysis|>":50258,"<|fix|>":50259,"<|explain|>":50260,
"<|end|>":50261,"<|pad|>":50262,"<|quickfix|>":50263,"<|bugfix|>":50264,
"<|suggestion|>":50265,"<|diff|>":50266,"<|context|>":50267,"<|lang|>":50268,
"<|sev_none|>":50269,"<|sev_low|>":50270,"<|sev_med|>":50271,
"<|sev_high|>":50272,"<|sev_crit|>":50273,
"<|reserved_1|>":50274,"<|reserved_2|>":50275,"<|reserved_3|>":50276,
}
SPECIAL_TOKENS_INV = {v:k for k,v in SPECIAL_TOKENS.items()}