depth

Functions

launch_iterative_depth_automodel

Create the full removal trajectory, resuming at candidate granularity.

run_depth_mip_scenarios

Run all scenario MIPs, then realize/evaluate the winners in one parent sweep.

ModeloptConfig DepthScenario

Bases: StrictModel

Show default config as JSON
Default config (JSON):

{
   "parent_checkpoint_identity": null,
   "hidden_width": null,
   "removals": [],
   "data_identity": null,
   "evaluator_revision": null,
   "metric": "lm_loss",
   "granularity": "subblock"
}

field data_identity: str [Required]
field evaluator_revision: str [Required]
field granularity: Granularity
field hidden_width: int [Required]
Constraints:
  • gt = 0

field metric: Literal['lm_loss']
field parent_checkpoint_identity: str [Required]
field removals: tuple[SublayerRemoval, ...]
property scenario_id: str
ModeloptConfig SublayerRemoval

Bases: StrictModel

Show default config as JSON
Default config (JSON):

{
   "layer_idx": null,
   "kind": null
}

field kind: Literal['block', 'attention', 'mamba', 'ffn', 'moe'] [Required]
field layer_idx: int [Required]
Constraints:
  • ge = 0

launch_iterative_depth_automodel(hydra_cfg)

Create the full removal trajectory, resuming at candidate granularity.

Parameters:

hydra_cfg (DictConfig)

Return type:

dict[str, Any]

run_depth_mip_scenarios(cfg)

Run all scenario MIPs, then realize/evaluate the winners in one parent sweep.

Parameters:

cfg (DictConfig)

Return type:

list[str]