mirror of
https://github.com/OpenBMB/VoxCPM.git
synced 2026-09-20 10:53:32 +08:00
30 lines
676 B
Python
30 lines
676 B
Python
from pydantic import BaseModel
|
|
from typing import List
|
|
|
|
|
|
class RopeScalingConfig(BaseModel):
|
|
type: str
|
|
long_factor: List[float]
|
|
short_factor: List[float]
|
|
original_max_position_embeddings: int
|
|
|
|
|
|
class MiniCPM4Config(BaseModel):
|
|
bos_token_id: int
|
|
eos_token_id: int
|
|
hidden_size: int
|
|
intermediate_size: int
|
|
max_position_embeddings: int
|
|
num_attention_heads: int
|
|
num_hidden_layers: int
|
|
num_key_value_heads: int
|
|
rms_norm_eps: float
|
|
rope_scaling: RopeScalingConfig
|
|
vocab_size: int
|
|
use_mup: bool = True
|
|
scale_emb: float
|
|
dim_model_base: int
|
|
scale_depth: float
|
|
rope_theta: float
|
|
kv_channels: int = None
|