Instructions to use TheCheng2005/ast425-student with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheCheng2005/ast425-student with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheCheng2005/ast425-student", device_map="auto") - Notebooks
- Google Colab
- Kaggle
AST425 student (test25): a cheap Gemini-distilled anomaly scorer for galaxy cutouts
A 576M-parameter image scorer: Qwen3-VL-8B-Instruct's vision encoder (language model removed) with LoRA adapters merged in and a linear head on the mean image token. It was trained to reproduce Gemini's 0–50 "how scientifically interesting is this cutout?" scores (the "Argon" labels in our runs) on 40k Hubble + 40k Euclid Q1 cutouts, and scores ~1,000 images/s on one H100.
Private research model (Chris Cheng, AST425Y, University of Toronto; supervisor Jo Bovy). Not for redistribution yet.
Quick start
pip install torch transformers safetensors pillow numpy # transformers with Qwen3-VL (tested with 5.12)
hf download TheCheng2005/ast425-student --local-dir ast425-student # needs access to this private repo
cd ast425-student
python score_student.py examples/*.jpg # -> path,logit,score
from score_student import load_student, score
model = load_student(".") # GPU in bf16 if available, else CPU in fp32
logits, scores = score(model, ["cutout1.jpg", "cutout2.png"])
Check your setup against examples/expected_scores.csv: six Euclid Q1 test cutouts from rank 1 to the last of 89,863,
with the logits from our GPU run (bf16) and from this script on a laptop CPU (fp32). Expect agreement to ~0.1 in logit.
Input and output
- Input: any image. Each is converted to greyscale and resized to 256 × 256 (PIL bicubic), exactly as in training. The Hubble training cutouts were 150 × 150 greyscale JPEGs; Euclid's were VIS cutouts of mixed size.
- Output: one logit per image;
score = 50 · sigmoid(logit)puts it on Gemini's 0–50 scale (training minimised cross-entropy against Gemini score / 50, so the score estimates Gemini's). We use it to rank: higher = more interesting.
Files
| file | what |
|---|---|
student.safetensors |
the full student, 1.15 GB: encoder weights (bf16, adapters merged: W + 2·B·A) + head (fp32) |
config.json |
the encoder's architecture (Qwen3-VL-8B's vision_config), input size, base-model revision |
score_student.py |
stand-alone loader and scorer (no peft, no other code needed) |
adapter/best.pt |
the trained weights exactly as saved by training (PyTorch state dict: LoRA A/B + head, 8.85M numbers) |
adapter/adapter.safetensors |
the same tensors as safetensors |
examples/ |
six Euclid Q1 test cutouts and their expected scores |
The adapter files are only needed to rebuild the student from the base model yourself: LoRA r = 16, alpha = 32 on
every attn.qkv, attn.proj, linear_fc1, linear_fc2 of the vision blocks and mergers, applied to
Qwen/Qwen3-VL-8B-Instruct at revision 0c351dd01ed87e9c1b53cbc748cba10e6187ff3b; key names follow peft
(visual.base_model.model.<module>.lora_A.default.weight). The three deepstack mergers' adapters are zero (the scorer
never reads their output).
Training
- Labels: Gemini 0–50 interest scores ("Argon"), one call per cutout, on 40,000 Hubble and 40,000 Euclid Q1 train cutouts.
- Recipe: LoRA r 16 / alpha 32 / dropout 0.05 on the frozen bf16 encoder, linear head on the mean of the 64 image tokens; AdamW (no weight decay), lr 2e-4, 3% warm-up, batch 32 (16 × 2 accumulation), grad-norm clip 0.3, 2 epochs, checkpoint chosen by validation top-5% recall; one seed.
Results (held-out test splits)
| test | measure | test25 |
|---|---|---|
| Hubble (AnomalyMatch test split, expert-checked anomalies) | share of known anomalies in the top 1 / 5 / 10% | 0.63 / 0.93 / 0.95 |
| Euclid Q1 test split (89,863) | in the top 5%: lenses (of 65) / mergers (of 2,049) / problem images (of 3,458) | 20 / 1,248 / 28 |
| GZ Evo test split (never trained on) | AUC for volunteers' mergers: DECaLS / DESI Legacy / CANDELS | 0.90 / 0.90 / 0.87 |
| AUC for "something odd": SDSS / UKIDSS | 0.90 / 0.93 |
Licence and terms
- Base model: Qwen3-VL-8B-Instruct, Apache-2.0 (© Alibaba Cloud / Qwen team). This repo contains a modified copy of its vision encoder (LoRA adapters merged in, language model removed).
- The student was trained on Gemini outputs; check Google's terms before any public release.
- Licence for the AST425 additions: not yet chosen (private repo).
- Downloads last month
- 4
Model tree for TheCheng2005/ast425-student
Base model
Qwen/Qwen3-VL-8B-Instruct