Starwell

Starwell

Starwell is a generative model for stellarator design. Given a number of field periods, an aspect ratio and a target magnetic-gradient scale length L_grad_B, it samples a plasma boundary for the mhd_stable problem of the ConStellaration benchmark, predicts its benchmark metrics and whether it meets the benchmark's constraints, grades it against a physics chain beyond the benchmark (MHD stability at finite beta, effective ripple and alpha-particle confinement), and lays out modular coils for it. It can also be asked for boundaries that meet chosen chain grades.

Usage

from transformers import AutoModel

model = AutoModel.from_pretrained("phanerozoic/starwell", trust_remote_code=True)

boundaries = model.sample(nfp=[3, 4], aspect_ratio=[8.0, 16.0], l_grad_b=[6.5, 21.5])
open("submission.json", "w").write(model.to_submission(boundaries))

design = model.design(nfp=3, aspect_ratio=8.0, l_grad_b=6.5)[0]
design["boundary"], design["predicted"], design["coils"]

validity = model.predict_validity(boundaries)
grades = model.predict_chain(boundaries)
low_ripple = model.sample(nfp=4, aspect_ratio=15.0, l_grad_b=19.0, chain={"effective_ripple": 0.01})
stable = model.sample(nfp=3, aspect_ratio=8.2, l_grad_b=5.8, chain={"mercier_vmec": None})

Boundaries are SurfaceRZFourier dicts (r_cos, z_sin) that constellaration evaluates directly; sample also takes tau, guidance, steps and seed, and model.config.sampling holds the integrator's defaults. Coils are simsopt CurveXYZFourier coefficients for one half period with their currents, and simsopt.field.coils_via_symmetries builds the full set; limits (in metres and per metre) sets the coil spacing, plasma clearance and curvature they are made for, and each coil set reports the bending and twist strain of a REBCO tape wound on it (strain_met).

Model

The generator is a conditional flow-matching transformer with one token per Fourier mode of the boundary, conditioned on nfp, log aspect ratio and log L_grad_B through adaptive layer norm, trained on boundaries that satisfy all five mhd_stable constraints; a second generator of the same design, conditioned also on the chain head's grades, answers chain targets (below) and requests at the field periods named in model.config.chain_generator["nfp"]. A residual MLP head predicts L_grad_B and the five constrained quantities. A second predicts the coils from the boundary and the engineering limits; it was trained on the coil sets of Proxima Fusion's CoilStellaration that meet their limits and on our own optimized sets. The model also carries a library of coil sets that meet every limit. The nearest library set is tried first and the head's coils when it misses a limit, with the currents solved on the boundary; polish=N refines the better start by up to N L-BFGS iterations of a stage-two coil objective, stopping once every limit holds, and polishes the other start only if the first fails.

A validity critic, an ensemble of residual MLPs, predicts each constraint's normalized violation. Its estimate is corrected by the scored boundaries nearest in its coordinates, which the model carries as a library: their exact violations plus the critic's difference between them and the boundary. sample draws select candidates per target (model.config.sampling) and keeps the one with the smallest corrected worst violation; predict_validity returns the probability that all five constraints hold and the corrected worst violation.

A chain head, an ensemble of residual MLPs on the boundary and the performance head's predictions, predicts the grades of a physics chain beyond the benchmark: VMEC's Mercier criterion and DESC's Mercier criterion and ideal-ballooning growth rate at 3 % volume-averaged beta, DESC's effective ripple and Gamma_c at rho 0.5, and the fraction of 3.5 MeV alphas lost within 10 ms at reactor scale. predict_chain returns each grade with its pass call and reactor, the call on every criterion together; model.config.chain_head["grades"] defines each grade and its limit. Given chain targets (grade names with limits, with None taking the grade's own limit, "stable": True for the stability grades, or "reactor" for every graded criterion), the second generator is conditioned on the targets it was trained with, VMEC Mercier stability, effective ripple and alpha losses, each as the chain head grades it; DESC's Mercier and ballooning grades enter only the choice among candidates. sample draws several candidates per target from it and keeps the one the chain head ranks closest to the targets within the benchmark's constraints, as the validity critic judges them.

Downloads last month
458
Safetensors
Model size
0.1B params
Tensor type
I64
路
F64
路
F32
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support