campaigns

Typed, resumable Puzzletron experiment campaigns.

Classes

CampaignModel

One immutable model entry in the cross-family campaign.

CampaignStageIdentity

Content identity for one model/stage execution and its dependencies.

CrossModelCampaign

An ordered set of models evaluated one stage at a time.

DatasetKind

Canonical datasets whose concrete settings are owned by campaign configs.

ModelKind

ParallelTopology

Logical model and data parallel dimensions for one model stage.

Functions

default_cross_model_campaign

Return the approved five-model acceptance matrix.

load_campaign

Load and validate a campaign YAML file without accepting implicit defaults.

class CampaignModel

Bases: object

One immutable model entry in the cross-family campaign.

__init__(model_id, hf_id, hf_revision, model_kind, is_multimodal, dataset, topology, topology_exception=None, force_hf=False, expect_native_automodel=True, mtp_policy='if_present', elastic_no_op_subblocks=())
Parameters:
  • model_id (str)

  • hf_id (str)

  • hf_revision (str)

  • model_kind (ModelKind)

  • is_multimodal (bool)

  • dataset (DatasetKind)

  • topology (ParallelTopology)

  • topology_exception (str | None)

  • force_hf (bool)

  • expect_native_automodel (bool)

  • mtp_policy (str)

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

Return type:

None

dataset: DatasetKind
elastic_no_op_subblocks: tuple[str, ...] = ()
expect_native_automodel: bool = True
force_hf: bool = False
hf_id: str
hf_revision: str
is_multimodal: bool
model_id: str
model_kind: ModelKind
mtp_policy: str = 'if_present'
to_dict()
Return type:

dict[str, Any]

topology: ParallelTopology
topology_exception: str | None = None
validate()
Return type:

None

class CampaignStageIdentity

Bases: object

Content identity for one model/stage execution and its dependencies.

__init__(campaign_fingerprint, model_id, stage, upstream_identities)
Parameters:
  • campaign_fingerprint (str)

  • model_id (str)

  • stage (str)

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

Return type:

None

campaign_fingerprint: str
classmethod create(campaign, *, model_id, stage, upstream_identities=())
Parameters:
  • campaign (CrossModelCampaign)

  • model_id (str)

  • stage (str)

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

Return type:

CampaignStageIdentity

property fingerprint: str
model_id: str
stage: str
upstream_identities: tuple[str, ...]
class CrossModelCampaign

Bases: object

An ordered set of models evaluated one stage at a time.

__init__(models, sequence_length=2048, activation_samples=16, kd_steps=8, data_layout='packed_varlen')
Parameters:
  • models (tuple[CampaignModel, ...])

  • sequence_length (int)

  • activation_samples (int)

  • kd_steps (int)

  • data_layout (str)

Return type:

None

activation_samples: int = 16
data_layout: str = 'packed_varlen'
property fingerprint: str
kd_steps: int = 8
models: tuple[CampaignModel, ...]
sequence_length: int = 2048
validate()
Return type:

None

class DatasetKind

Bases: str, Enum

Canonical datasets whose concrete settings are owned by campaign configs.

PINNED_INTERSYN = 'pinned_intersyn'
PUZZLE_KD_TEXT = 'puzzle_kd_text'
__new__(value)
class ModelKind

Bases: str, Enum

DENSE = 'dense'
MOE = 'moe'
__new__(value)
class ParallelTopology

Bases: object

Logical model and data parallel dimensions for one model stage.

__init__(tp, cp, pp, fsdp, ep)
Parameters:
  • tp (int)

  • cp (int)

  • pp (int)

  • fsdp (int)

  • ep (int)

Return type:

None

cp: int
ep: int
fsdp: int
pp: int
tp: int
validate()
Return type:

None

property world_size: int
default_cross_model_campaign()

Return the approved five-model acceptance matrix.

Return type:

CrossModelCampaign

load_campaign(path)

Load and validate a campaign YAML file without accepting implicit defaults.

Parameters:

path (str | Path)

Return type:

CrossModelCampaign