mirror of
https://github.com/FlashML-org/FreeToken.git
synced 2026-11-26 05:15:46 +08:00
36 lines
881 B
Python
36 lines
881 B
Python
from .blocks import BaseLLMModel
|
|
from .config import (
|
|
AttentionGroupConfig,
|
|
BaseAttentionGroupConfig,
|
|
DSV4AttentionGroupConfig,
|
|
FullAttentionGroupConfig,
|
|
KVCacheGroupSpec,
|
|
LinearGatedDeltaGroupConfig,
|
|
ModelConfig,
|
|
RotaryConfig,
|
|
SWAAttentionGroupConfig,
|
|
)
|
|
from .register import get_model_class
|
|
from .weight import load_moe_expert_sources, load_weight
|
|
|
|
|
|
def create_model(model_config: ModelConfig) -> BaseLLMModel:
|
|
return get_model_class(model_config.architectures[0], model_config)
|
|
|
|
|
|
__all__ = [
|
|
"BaseLLMModel",
|
|
"create_model",
|
|
"load_weight",
|
|
"load_moe_expert_sources",
|
|
"AttentionGroupConfig",
|
|
"BaseAttentionGroupConfig",
|
|
"DSV4AttentionGroupConfig",
|
|
"FullAttentionGroupConfig",
|
|
"LinearGatedDeltaGroupConfig",
|
|
"ModelConfig",
|
|
"RotaryConfig",
|
|
"SWAAttentionGroupConfig",
|
|
"KVCacheGroupSpec",
|
|
]
|