Skip to content

Add Astrom3#11

Merged
hombit merged 7 commits into
mainfrom
astrom3
May 14, 2026
Merged

Add Astrom3#11
hombit merged 7 commits into
mainfrom
astrom3

Conversation

@hombit
Copy link
Copy Markdown
Member

@hombit hombit commented May 11, 2026

Fix #1

hombit added 7 commits May 11, 2026 14:28
Add _ATATEmbedderMulti wrapper and run_export_multi() that emit all three
aggregation variants (token, mean, full) as named outputs in a single file.

Add benchmark_multi.py comparing the single-file approach to running three
separate ONNX files. Results on CPU (batch=4):
  - File size: 4.6 MB vs 13.8 MB for three files (3.0x smaller)
  - Latency: 104 ms vs 252 ms sequential (2.4x faster)
  - Outputs are numerically identical (max diff = 0)
Compare each single-output file against requesting only that output
from the multi-output file. onnxruntime prunes unused outputs, so
per-variant latency is essentially the same (within ±5% noise), while
the multi-output file is 3x smaller on disk.
Exports the Informer photo encoder from AstroMLCore/AstroM3-CLIP-photo
as a single multi-output ONNX file (mean, max, sequence at d_model=128).

ProbSparse attention is replaced with standard SDPA for ONNX
compatibility, following the same approach used for ATCAT.

Weights are loaded from the standalone HuggingFace checkpoint
(classification head silently ignored via strict=False).
Test data is sourced from AstroMLCore/AstroM3Processed (full_0 split).
- Remove max pooling (not motivated by Informer design — no training signal
  for max to be meaningful)
- Add validate.py comparing patched PyTorch vs ONNX (max abs diff ~2e-6)
- Note CC-BY-4.0 weights license in README and model card frontmatter
- Move _CLASS_NAMES to test_data.py (only used there)
- Add onnxruntime to project deps (needed by validate)
@hombit hombit merged commit e2a774d into main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AstroM3

1 participant