|
io-chess
UCI chess engine
|
Classes | |
| class | OnnxWrapper |
| class | OnnxBackboneWrapper |
| class | OnnxExpertWrapper |
Functions | |
| Dict[str, torch.Tensor] | _extract_state_dict (object ckpt_obj) |
| _write_u32s (f, values) | |
| _write_f32_array (f, np.ndarray arr) | |
| None | export_native_weights (Path out_path, ChessNetFactorizedMoE model) |
| None | export_inputs_and_refs (Path inputs_path, Path refs_path, ChessNetFactorizedMoE model, int n_samples, int seed) |
| None | main () |
Variables | |
| int | MAGIC_WEIGHTS = 0x32454F4D |
| int | MAGIC_INPUTS = 0x32504E49 |
| int | MAGIC_REFS = 0x32464552 |
| int | VERSION = 1 |
| int | MAX_BRANCH_PLANES = 10 |
| dict | POOL_TO_CODE |
@file export.py @brief Export parity artifacts for training/model.py 1) Native float32 weights for a C++ loader 2) ONNX models (monolithic + split backbone/experts) 3) Deterministic input samples and PyTorch reference outputs
|
protected |

|
protected |

|
protected |

| None export_inputs_and_refs | ( | Path | inputs_path, |
| Path | refs_path, | ||
| ChessNetFactorizedMoE | model, | ||
| int | n_samples, | ||
| int | seed ) |


| None export_native_weights | ( | Path | out_path, |
| ChessNetFactorizedMoE | model ) |


| None main | ( | ) |


| int export.MAGIC_INPUTS = 0x32504E49 |
| int export.MAGIC_REFS = 0x32464552 |
| int export.MAGIC_WEIGHTS = 0x32454F4D |
| int export.MAX_BRANCH_PLANES = 10 |
| dict export.POOL_TO_CODE |
| int export.VERSION = 1 |