Views
No views yet
d_model=512, 8 heads, ~26M parameters)
trained with masked-token prediction on DESI EDR/SV3 spectra
(Multimodal Universe).
The redshift token is always masked and a prediction head is trained
jointly with reconstruction, so redshift enters the representation space
from step one — the redesign of AION-1's redshift handling that this course
project asked for.log(1+z) bins: cross-entropy
normalized by log(n_bins), sqrt-inverse class weights estimated from the real 80k
training labels, 1:1 loss weighting with reconstruction, and a leak-free
train/held-out split. It replaced v1 after passing every release gate of the project
plan (comparison.json, decision: promote_v2_1). The official redshift prediction
is z_pred_map (posterior argmax); z_pred (posterior expectation) is kept for
backward compatibility.z_pred_map:| metric | v1 (50k, regression head) | v2.1 (fine-tune, 100-bin classification) |
|---|---|---|
| catastrophic outliers η₀.₁₅ | 22.6 % | 14.95 % |
| σ_NMAD | 0.083 | 0.030 |
| MAE_norm ⟨|Δz|/(1+z)⟩ | 0.107 | 0.096 |
| η₀.₁₅ in z ∈ [1.5, 2.5) | 82.7 % | 23.5 % |
| prediction ceiling (max z_pred) | 2.00 | 3.52 |
| reconstruction RMSE (masked, arcsinh space) | 0.819 | 0.817 |
evaluation_v1_baseline.ipynb.1pip install "desi-fm @ git+https://github.com/Julian0444/desi-spectra-fm"
2pip install huggingface_hub1from huggingface_hub import hf_hub_download
2from desi_fm.predict import predict_spectrum
3
4ckpt = hf_hub_download("jirustaroure/desi-spectra-fm", "checkpoint_last.pt")
5result = predict_spectrum(flux=flux, wavelength=wavelength_angstrom,
6 checkpoint_path=ckpt)
7result["z_pred_map"] # predicted redshift (official, posterior argmax)
8result["z_confidence"] # posterior concentration in [0, 1]
9result["reconstruction_input_grid"] # reconstruction on your wavelength gridlog(λ), not a token index, so wavelength
coverage different from DESI's is handled transparently.z_confidence to filter unreliable predictions. See the
evaluation notebook
for the quantified analysis.| file | description |
|---|---|
checkpoint_last.pt | model weights (state_dict) + training args |
config.json | architecture configuration |
training_args.json | exact training flags of the run |
metrics.jsonl | per-step training/validation metrics |
faiss/spectra.faiss | FAISS index (cosine) of 15k training-spectra embeddings from embed_spectrum() |
faiss/spectra_meta.npz | catalog redshift per indexed row |