capabilities

Classes

ParallelCapabilities

SubblockCapabilities

AxisCapabilities

MagnitudeFallbackSpec

Descriptor-owned observation contract for the generic |activation| metric.

StageCapabilities

ExportCapabilities

PuzzletronCapabilities

Functions

default_capabilities

Conservative capability declaration for current HF-backed descriptors.

validate_capabilities

resolve_score_method

Choose the specialized metric first, then an explicit generic fallback.

class AxisCapabilities

Bases: object

__init__(axis_id, subblock_kind, field, sortable=True, variant_only=False, score_hooks=(), sort_impl=None, materialize_impl=None, runtime_slice_impl=None, vllm_export=False, force_hf=True, native_automodel_required=False, values=(), constraints=(), magnitude_fallback=None)
Parameters:
  • axis_id (str)

  • subblock_kind (str)

  • field (str)

  • sortable (bool)

  • variant_only (bool)

  • score_hooks (tuple[str, ...])

  • sort_impl (str | None)

  • materialize_impl (str | None)

  • runtime_slice_impl (str | None)

  • vllm_export (bool)

  • force_hf (bool)

  • native_automodel_required (bool)

  • values (tuple[Any, ...])

  • constraints (tuple[str, ...])

  • magnitude_fallback (MagnitudeFallbackSpec | None)

Return type:

None

axis_id: str
constraints: tuple[str, ...] = ()
field: str
force_hf: bool = True
magnitude_fallback: MagnitudeFallbackSpec | None = None
materialize_impl: str | None = None
native_automodel_required: bool = False
runtime_slice_impl: str | None = None
score_hooks: tuple[str, ...] = ()
sort_impl: str | None = None
sortable: bool = True
subblock_kind: str
values: tuple[Any, ...] = ()
variant_only: bool = False
vllm_export: bool = False
exception CapabilityValidationError

Bases: ValueError

class ExportCapabilities

Bases: object

__init__(hf=True, vllm=True, per_layer_config=True, no_op=True, mamba_cache=False, anymodel_arch_info_required=False)
Parameters:
  • hf (bool)

  • vllm (bool)

  • per_layer_config (bool)

  • no_op (bool)

  • mamba_cache (bool)

  • anymodel_arch_info_required (bool)

Return type:

None

anymodel_arch_info_required: bool = False
hf: bool = True
mamba_cache: bool = False
no_op: bool = True
per_layer_config: bool = True
vllm: bool = True
class MagnitudeFallbackSpec

Bases: object

Descriptor-owned observation contract for the generic |activation| metric.

__init__(observation_module, tensor_selector, scored_dim, output_field, expected_size)
Parameters:
  • observation_module (str)

  • tensor_selector (str)

  • scored_dim (int)

  • output_field (str)

  • expected_size (int)

Return type:

None

expected_size: int
observation_module: str
output_field: str
scored_dim: int
tensor_selector: str
class ParallelCapabilities

Bases: object

__init__(tp=True, pp=True, cp=True, fsdp=True, ep=False, sequence_parallel=False, invalid_combinations=())
Parameters:
  • tp (bool)

  • pp (bool)

  • cp (bool)

  • fsdp (bool)

  • ep (bool)

  • sequence_parallel (bool)

  • invalid_combinations (tuple[str, ...])

Return type:

None

cp: bool = True
ep: bool = False
fsdp: bool = True
invalid_combinations: tuple[str, ...] = ()
pp: bool = True
sequence_parallel: bool = False
tp: bool = True
class PuzzletronCapabilities

Bases: object

__init__(descriptor_name, descriptor_version, model_family, force_hf_supported, native_automodel_supported, parallelism, subblocks, axes, stages, export, notes=())
Parameters:
Return type:

None

axes: dict[str, AxisCapabilities]
descriptor_name: str
descriptor_version: str
export: ExportCapabilities
force_hf_supported: bool
model_family: str
native_automodel_supported: bool
notes: tuple[str, ...] = ()
parallelism: ParallelCapabilities
stages: StageCapabilities
subblocks: dict[str, SubblockCapabilities]
to_dict()
Return type:

dict[str, Any]

class StageCapabilities

Bases: object

__init__(convert=True, activation=True, sort=True, bypass=False, library=True, scoring=True, rpc=False, mip=True, materialize=True, global_kd=False, aiperf=False, evaluation=False)
Parameters:
  • convert (bool)

  • activation (bool)

  • sort (bool)

  • bypass (bool)

  • library (bool)

  • scoring (bool)

  • rpc (bool)

  • mip (bool)

  • materialize (bool)

  • global_kd (bool)

  • aiperf (bool)

  • evaluation (bool)

Return type:

None

activation: bool = True
aiperf: bool = False
bypass: bool = False
convert: bool = True
evaluation: bool = False
global_kd: bool = False
library: bool = True
materialize: bool = True
mip: bool = True
rpc: bool = False
scoring: bool = True
sort: bool = True
class SubblockCapabilities

Bases: object

__init__(kind, config_class, names, no_op=False, replacement=False, bypass=False, tensor_bindings=False)
Parameters:
  • kind (str)

  • config_class (str)

  • names (tuple[str, ...])

  • no_op (bool)

  • replacement (bool)

  • bypass (bool)

  • tensor_bindings (bool)

Return type:

None

bypass: bool = False
config_class: str
kind: str
names: tuple[str, ...]
no_op: bool = False
replacement: bool = False
tensor_bindings: bool = False
default_capabilities(*, descriptor_name, model_family=None, native_automodel_supported=False)

Conservative capability declaration for current HF-backed descriptors.

Parameters:
  • descriptor_name (str)

  • model_family (str | None)

  • native_automodel_supported (bool)

Return type:

PuzzletronCapabilities

resolve_score_method(axis)

Choose the specialized metric first, then an explicit generic fallback.

Parameters:

axis (AxisCapabilities)

Return type:

str

validate_capabilities(capabilities, *, enabled_axes=(), force_hf=True, ep=1, require_vllm=False, require_complete_pipeline=False)
Parameters:
  • capabilities (PuzzletronCapabilities)

  • enabled_axes (list[str] | tuple[str, ...])

  • force_hf (bool)

  • ep (int)

  • require_vllm (bool)

  • require_complete_pipeline (bool)

Return type:

None