build_replacement_library

Build a v2 virtual replacement library from one sorted-teacher checkpoint.

Functions

build_replacement_library_from_sorted_teacher

Build replacement_library.json and one-replacement scoring solutions.

launch_build_replacement_library

Build the modern virtual replacement library.

build_replacement_library_from_sorted_teacher(master_puzzle_dir, sorted_teacher_dir, descriptor, ffn_targets=None, attn_targets=None, search_space=None, include_noops=True, hidden_width=None)

Build replacement_library.json and one-replacement scoring solutions.

The library is virtual: every entry has empty weight_paths and is materialized from sorted_teacher_dir by slicing or no-op replacement.

Parameters:
  • master_puzzle_dir (Path | str)

  • sorted_teacher_dir (Path | str)

  • descriptor (ModelDescriptor)

  • ffn_targets (list[int] | None)

  • attn_targets (list[tuple[int, int]] | None)

  • search_space (dict[str, Any] | None)

  • include_noops (bool)

  • hidden_width (int | None)

Return type:

None

launch_build_replacement_library(cfg)

Build the modern virtual replacement library.

Parameters:

cfg (DictConfig)

Return type:

None