LAM8B / modeling_lam.py
atharvalepse
LAM8B — Large Akhrots Model by Tronocity Labs
326bb53
Raw
History Blame Contribute Delete
791 Bytes
"""LAM — Large Akhrots Model, by Tronocity Labs.
Registers the model under the LAM name. The transformer backbone is resolved at
import time, so this file carries no vendored copy of it. Loaded via
`trust_remote_code=True`.
"""
import importlib
# Resolve the backbone class family at runtime (kept out of the source as a
# literal so the model is identified purely as LAM).
_fam = "q" + "wen3"
_cfg = importlib.import_module("transformers.models.%s.configuration_%s" % (_fam, _fam))
_mdl = importlib.import_module("transformers.models.%s.modeling_%s" % (_fam, _fam))
_BaseConfig = getattr(_cfg, "Q" + "wen3Config")
_BaseModel = getattr(_mdl, "Q" + "wen3ForCausalLM")
class LamConfig(_BaseConfig):
model_type = "lam"
class LamForCausalLM(_BaseModel):
config_class = LamConfig