mstar.model.orpheus.components.language_model#
Orpheus language model: Llama 3.2 3B-style transformer.
Built from the shared transformer components in mstar.model.components.
Orpheus uses standard Llama-style RMSNorm (Llama mode, not Gemma),
SwiGLU MLP, GQA self-attention with Llama-3 RoPE scaling, and no
QK-norm.
QKV and gate/up projections are fused from construction via the
parallel-linear classes (with a trivial single-rank comm group for the
non-TP case). Weight loading goes through load_weights with stacked
shard routing (no post-load consolidate step).
Classes
|
|
|
- class mstar.model.orpheus.components.language_model.OrpheusForCausalLM(config, comm_group=None)[source]#
Bases:
Module- Parameters:
config (OrpheusModelConfig)
comm_group (CommGroup | None)
- forward(query_sequence, *, label, **kwargs)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class mstar.model.orpheus.components.language_model.OrpheusLanguageModel(config, comm_group=None)[source]#
Bases:
Module- Parameters:
config (OrpheusModelConfig)
comm_group (CommGroup | None)
- forward(query_sequence, *, label)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.