Skip to content

Conversation

@lhparker1
Copy link
Member

@lhparker1 lhparker1 commented Jun 19, 2025

This pull request introduces updates to the README.md file and significant changes to the aion codebase, focusing on modality definitions and the model's forward pass logic. The most notable changes include adding num_tokens attributes to various modality classes, refactoring the forward method in the model to dynamically compute encoder and decoder tokens, and improving the documentation.

Documentation Updates:

  • README.md: Added a centered AION logo image for better visual presentation and renamed the "Key Use Cases" section to "Example Use Cases" for clarity. [1] [2]

Modality Enhancements:

  • aion/modalities.py: Introduced a num_tokens attribute to all modality classes (e.g., HSCImage, LegacySurveyImage, DESISpectrum, GaiaFluxG, etc.) to define the number of tokens each modality contributes. This enables dynamic token handling in the model. [1] [2] [3] [4] [5]

Model Forward Pass Refactor:

  • aion/model.py: Refactored the forward method to dynamically compute num_encoder_tokens and num_decoder_tokens based on input and target modalities. Added a helper _forward method for modularity, and replaced target_mask with target_modality as an input parameter for better usability.

These changes collectively enhance the flexibility and maintainability of the codebase, particularly in handling diverse astronomical modalities and adapting to varying input/output configurations.

@lhparker1 lhparker1 requested a review from EiffL June 19, 2025 23:41
Copy link
Contributor

@EiffL EiffL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK LGTM

@lhparker1 lhparker1 merged commit 4ad5ecd into main Jun 27, 2025
3 checks 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.

3 participants