ch1mera / chimera /__init__.py
Lgr54HFi's picture
feat: register hyper paradigms in chimera/__init__.py (v5.3)
71bf490 verified
"""Chimera 5.3 — CPU-first causal LM with ternary 1.58-bit weights."""
from .config import load_config, scale_config, tiny_config
__version__ = "5.3.0"
__all__ = [
"load_config", "scale_config", "tiny_config",
"Chimera51ForCausalLM", "Chimera51Block", "expand_layer_pattern",
"BitLinear", "RMSNorm", "pack_ternary", "unpack_ternary",
"ternarize_weight", "_quantize_weights_ternary", "apply_2_4_sparsity_",
"enable_native_kernel", "native_kernel_available",
"ChimeraTokenizer",
"SelfEvolutionEngine", "SemanticMemory", "InPlaceTTT",
"EpisodicCaseMemory", "MetaGuidelineBank", "SelfFeedback",
"LoopDepthClassifier",
# v5.3 — Hyper paradigms
"GrowLengthDataset", "GrowLengthScheduler",
"apply_reservoir_freezing", "SparseMeZOOptimizer",
"precompute_ternary_cache", "pack_documents",
"ProgressiveUnfreezer", "cosine_lr",
]
# Lazy public surface — keeps ``import chimera`` cheap (no torch import until
# the user actually touches a model class).
def __getattr__(name):
if name in {"Chimera51ForCausalLM", "Chimera51Block", "expand_layer_pattern"}:
from .model import Chimera51ForCausalLM, Chimera51Block, expand_layer_pattern
return locals()[name]
if name in {"BitLinear", "RMSNorm", "pack_ternary", "unpack_ternary",
"ternarize_weight", "_quantize_weights_ternary",
"apply_2_4_sparsity_", "enable_native_kernel",
"native_kernel_available"}:
from . import quantization as _q
return getattr(_q, name)
if name == "ChimeraTokenizer":
from .tokenizer import ChimeraTokenizer
return ChimeraTokenizer
if name in {"SelfEvolutionEngine", "SemanticMemory", "InPlaceTTT",
"EpisodicCaseMemory", "MetaGuidelineBank", "SelfFeedback",
"LoopDepthClassifier"}:
from . import evolution as _evo
return getattr(_evo, name)
if name in {"GrowLengthDataset", "GrowLengthScheduler",
"apply_reservoir_freezing", "SparseMeZOOptimizer",
"precompute_ternary_cache", "pack_documents",
"ProgressiveUnfreezer", "cosine_lr"}:
from . import hyper as _hyp
return getattr(_hyp, name)
raise AttributeError(name)