ml-mace-finetune
Installation
SKILL.md
MACE Fine-tuning
Goal
To evaluate and improve the accuracy of a foundation MACE potential for a specific chemical system or physical property using the provided Python fine-tuning script and data-augmentation.
Instructions
- Prepare Labeled Dataset: Obtain diverse structures with high-fidelity labels (energy, forces, stress). See the
/benchmark-finetuningworkflow for details. - Custom Data Conversion: Read the source data format and write a customized conversion script if needed, formatting it for the subsequent preparation step.
- Benchmarking: Predict results on the new labels and benchmark the foundation model using ml-mlip-benchmark.
- Data Preparation: Execute
scripts/prepare_mace_data.pyto convert JSON structures to.xyzdata files. - Config Generation: Execute
scripts/generate_mace_config.pyusing the.xyzdata to producefinetune_config.yaml. - Fine-Tuning: Execute
mace_run_train --config /path/to/finetune_config.yamlto begin fine-tuning natively on the GPU. - Validation: Verify convergence and compare against the benchmarked foundation metrics.
- Registration: Use the
register_modeltool to register the newly fine-tuned model checkpoint into the local registry so future research tasks can discover and reuse it.
Training Configuration
MACE fine-tuning is divided into a data preparation step, a configuration generation step, and a standard native training run. The script scripts/prepare_mace_data.py generates .xyz files, and scripts/generate_mace_config.py converts arguments into a fully-formed finetune_config.yaml configuration compatible with the MACE default parser.