Views
No views yet
Note: The validation loss is only comparable across releases that share the same Loss Type. For example, an Augmented Lagrangian loss includes constraint-violation penalties and Lagrangian terms, so its magnitude is not directly comparable to a plain MSE loss.
config.json - Model configuration and metadatamodel.pt - Complete PyTorch checkpoint with metadata and configmodel.safetensors - Model weights in SafeTensors format (recommended)requirements.txt - Required Python librarieslumina-inference repository:git clone git@github.com:argonne-gridfm/lumina-inference.git1cd lumina-inference
2pip install -e .1import json
2
3import torch
4from huggingface_hub import hf_hub_download
5from safetensors.torch import load_file
6
7from lumina_inference import Modeler
8from lumina_inference.dataset import OPFDataset
9from lumina_inference.loader import DataLoader
10
11# Download model artifacts from Hugging Face
12config_path = hf_hub_download(repo_id="argonne/LUMINA-2M", filename="config.json")
13
14# Load config
15with open(config_path, "r") as f:
16 config_data = json.load(f)
17
18# Set up device and modeler
19device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
20modeler = Modeler(device)1# Load weights from SafeTensors
2safetensors_path = hf_hub_download(
3 repo_id="argonne/LUMINA-2M", filename="model.safetensors"
4)
5state_dict = load_file(safetensors_path)
6modeler.load_model(config_data, state_dict)1# Load weights from PyTorch Checkpoint on CPU
2model_path = hf_hub_download(repo_id="argonne/LUMINA-2M", filename="model.pt")
3checkpoint = torch.load(model_path, map_location="cpu")
4state_dict = checkpoint.get("model_state_dict")
5modeler.load_model(config_data, state_dict)1# Simple argument defaults
2case_name = config_data.get("case_name", "pglib_opf_case14_ieee")
3batch_size = 1
4max_batches = 50
5
6# Loading OPF dataset
7dataset = OPFDataset(root="./opf_data", case_name=case_name)
8loader = DataLoader(dataset, batch_size=batch_size, shuffle=False)
9
10# Run model across data batches
11preds = modeler.run_predictions(loader, max_batches=max_batches)
12
13# Inspect first prediction
14if preds:
15 predictions_cpu, batch_cpu = preds[0]
16 print(f"Prediction keys: {list(predictions_cpu.keys())}")
17 for key, tensor in predictions_cpu.items():
18 if isinstance(tensor, torch.Tensor):
19 print(f" {key}: shape={tensor.shape}, dtype={tensor.dtype}")1from lumina_inference import load_from_json_file, load_from_dict
2
3# From a JSON file
4data = load_from_json_file("path/to/opf_sample.json")
5result = modeler.predict_single(data)
6
7# From a Python dictionary
8data = load_from_dict(opf_dict)
9result = modeler.predict_single(data)| Version | Date | Epochs | Val Loss | Training Case |
|---|---|---|---|---|
| v0.1.3 | 2026-08-12 | 69 | 0.190340 | full-topology + N-1 + FT |
| v0.1.2 | 2026-07-31 | 63 | 0.120890 | full-topology + N-1 |
| v0.1.1 | 2026-07-16 | 34 | 0.052400 | case14_ieee, case30_ieee, case57_ieee, case118_ieee, case500_goc, case2000_goc, case4661_sdet, case6470_rte, case10000_goc, case13659_pegase |
| v0.1.0 | 2026-06-30 | 27 | 0.468559 | case14_ieee, case30_ieee, case57_ieee, case118_ieee, case500_goc, case2000_goc, case4661_sdet, case6470_rte, case10000_goc, case13659_pegase |
| v0.1.0-rc1 | 2026-06-10 | 10 | 0.291310 | case14_ieee, case30_ieee, case57_ieee, case118_ieee, case500_goc, case2000_goc, case4661_sdet, case6470_rte, case10000_goc, case13659_pegase |
1@inproceedings{li2026lumina,
2 title={LUMINA: Foundation Models for Topology Transferable ACOPF},
3 author={Li, Yijiang and Memon, Zeeshan and Jin, Hongwei and Fenu, Stefano and Song, Keunju and Sharma, Sunash B and Gasana, Parfait and Kim, Hongseok and Zhao, Liang and Kim, Kibaek},
4 booktitle={ICLR 2026 Workshop on Foundation Models for Science: Real-World Impact and Science-First Design},
5 doi={10.48550/arXiv.2603.04300},
6 url={https://doi.org/10.48550/arXiv.2603.04300}
7}LICENSE and NOTICE files for the full terms and attribution.