bridge.models.muse_spark_open.text_only#
Language-only checkpoint views and standalone export artifacts for Muse Spark Open.
Module Contents#
Classes#
Expose the VL decoder and separate LM head through standalone text keys. |
Functions#
Project a VL source without mutating its config, index, or weights. |
|
Install the text-only causal LM class that Transformers does not provide. |
API#
- class bridge.models.muse_spark_open.text_only.MuseSparkTextStateSource(
- path: str | pathlib.Path,
- *,
- revision: str | None,
- hub_kwargs: dict,
Bases:
megatron.bridge.models.hf_pretrained.state.SafeTensorsStateSourceExpose the VL decoder and separate LM head through standalone text keys.
Prefix sources retain index-first loading and the existing streaming writer. No perception tensor is loaded, including when shards mix modalities.
Initialization
- property key_to_filename_map: dict[str, str]#
Retain source shard grouping while excluding perception keys.
- load_tensors(keys_to_load: list[str]) dict[str, torch.Tensor]#
Read only the selected language tensors under their original names.
- bridge.models.muse_spark_open.text_only.select_text_pretrained(
- hf_pretrained: megatron.bridge.models.hf_pretrained.PreTrainedCausalLM,
Project a VL source without mutating its config, index, or weights.
- bridge.models.muse_spark_open.text_only.export_text_artifacts(path: pathlib.Path) None#
Install the text-only causal LM class that Transformers does not provide.