runtime_candidate

Shared reversible application of one complete typed block candidate.

Classes

RemovableCandidateHandle

Own hooks and entered contexts for one live candidate application.

Functions

apply_runtime_candidate

Apply Mamba/MoE/no-op typed semantics without resizing parameters.

class RemovableCandidateHandle

Bases: object

Own hooks and entered contexts for one live candidate application.

__init__(handles, contexts)
Parameters:
  • handles (list[Any])

  • contexts (list[AbstractContextManager])

remove()
Return type:

None

apply_runtime_candidate(layer, parent_block_config, child_block_config, *, expert_keep_ids=None)

Apply Mamba/MoE/no-op typed semantics without resizing parameters.

The low-level hook construction remains colocated with the AutoModel solution recipe for now; this API is the single lifecycle boundary used by both replace-one-block scoring and elastic bypass.

Return type:

RemovableCandidateHandle