astroshawn commited on
Commit
1b36117
Β·
verified Β·
1 Parent(s): 10735c1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +99 -3
README.md CHANGED
@@ -1,3 +1,99 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🌌 SpecCLIP: Cross-Survey Spectral Foundation Model
2
+
3
+ [![arXiv](https://img.shields.io/badge/arXiv-2507.01939-b31b1b.svg)](https://arxiv.org/abs/2507.01939)
4
+ [![GitHub](https://img.shields.io/badge/GitHub-Repo-black)](https://github.com/Xiaosheng-Zhao/SpecCLIP)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+
7
+ **SpecCLIP** is a contrastive + domain-preserving foundation model designed to align **LAMOST LRS** spectra with **Gaia XP** spectrophotometric data.
8
+ It learns a **general-purpose spectral embedding (768-dim)** that supports:
9
+
10
+ * **Stellar parameter estimation**
11
+ * **Cross-survey spectral translation** (LAMOST ⟷ Gaia XP)
12
+ * **Similarity retrieval** across 10M+ LRS and 220M+ XP spectra
13
+
14
+ For full documentation, installation instructions, examples, and end-to-end usage, please visit the **GitHub repository**:
15
+ πŸ‘‰ [https://github.com/Xiaosheng-Zhao/SpecCLIP](https://github.com/Xiaosheng-Zhao/SpecCLIPe)
16
+
17
+ ---
18
+
19
+ ## πŸ”§ Available Models (Weights Only)
20
+
21
+ The following pretrained weights are included in this model repository:
22
+
23
+ | File | Description | Embedding Dim |
24
+ | -------------------------------------------- | ------------------------------------- | ------------- |
25
+ | `encoders/lrs_encoder.ckpt` | LAMOST LRS masked transformer encoder | 768 |
26
+ | `encoders/xp_encoder.ckpt` | Gaia XP masked transformer encoder | 768 |
27
+ | `encoders/xp_encoder_mlp.ckpt` | Gaia XP autoencoder (MLP head) | 768 |
28
+ | `specclip/specclip_model_predrecon_mlp.ckpt` | CLIP alignment + pred+recon | 768 |
29
+ | `specclip/specclip_model_split_mlp.ckpt` | CLIP alignment + split pred/recon | 768 |
30
+
31
+ ---
32
+
33
+ ## πŸ“₯ Load a Model Weight
34
+
35
+ ```python
36
+ from huggingface_hub import hf_hub_download
37
+
38
+ path = hf_hub_download(
39
+ repo_id="astroshawn/SpecCLIP",
40
+ filename="encoders/xp_encoder.ckpt"
41
+ )
42
+
43
+ print("Downloaded to:", path)
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 🧠 What the Model Does
49
+
50
+ SpecCLIP consists of:
51
+
52
+ * **Two masked transformer encoders**
53
+ – LAMOST LRS
54
+ – Gaia XP
55
+ * **Contrastive alignment loss (CLIP-style)**
56
+ * **Domain-preserving prediction & reconstruction heads**
57
+ * **Cross-modal decoder** for spectrum translation
58
+
59
+ It produces **shared embeddings** enabling multi-survey astrophysical analysis.
60
+
61
+ ---
62
+
63
+ ## πŸ“„ Full Documentation
64
+
65
+ To keep the Hugging Face card concise, **all detailed instructions**, including:
66
+
67
+ * Installation
68
+ * Parameter prediction
69
+ * Spectral translation
70
+ * Retrieval
71
+ * Full examples (Python + figures)
72
+ * Acknowledgments
73
+
74
+ are available at the GitHub repo:
75
+
76
+ πŸ‘‰ **[https://github.com/Xiaosheng-Zhao/SpecCLIP](https://github.com/Xiaosheng-Zhao/SpecCLIP)**
77
+
78
+ ---
79
+
80
+ ## πŸ“Š Citation
81
+
82
+ ```bibtex
83
+ @article{Zhao2025SpecCLIP,
84
+ author = {Xiaosheng Zhao et al.},
85
+ title = {SpecCLIP: Aligning and Translating Spectroscopic Measurements for Stars},
86
+ year = {2025},
87
+ eprint = {2507.01939},
88
+ archivePrefix = {arXiv},
89
+ primaryClass = {astro-ph.IM}
90
+ }
91
+ ```
92
+
93
+ ---
94
+
95
+ ## πŸ“¬ Contact
96
+
97
+ * GitHub Issues: [https://github.com/Xiaosheng-Zhao/SpecCLIP/issues](https://github.com/Xiaosheng-Zhao/SpecCLIP/issues)
98
+ * Email: [xzhao113@jh.edu](mailto:xzhao113@jh.edu)
99
+