How taigaoma1997/optogpt works
OptoGPT is a research codebase for inverse design of optical multilayer films, a forward surrogate simulator, and self-improving augmentation for out-of-distribution designs. The primary supported training workflow prepares structure/spectrum pairs, builds a transformer, and trains it; augmentation adds candidate generation and optical simulation to evaluate designs. The graph also preserves the separately documented OL-Transformer and synthetic development-data capability. Source excerpts support the OptoGPT and simulator links; wiring among the unsampled self-improving scripts is left unspecified.
Main entry points: run_self_improving.py Improvement runner · run_optogpt.py Inverse training entry · prepare_aug_data.py Augmentation preparation · sim.py Thin-film simulator
Components 18
OptoGPT models
- Transformer models
optogpt/core/models/transformer.py - Inverse design model
optogpt/core/models/transformer.py - Forward surrogate
optogpt/core/models/transformer.py
Optical simulation
- Thin-film simulator
optogpt/core/datasets/sim.py - Optical constants
optogpt/nk
Self-improving augmentation
- OOD spectrum generator
self_improving/generate_dev_data.py - Augmentation preparation
self_improving/prepare_aug_data.py - Design perturbation
self_improving/data_perturb.py - Augmented data tools
self_improving/combine_data.py - Model retraining
self_improving/model_retrain.py - Improvement runner
self_improving/run_self_improving.py
Training pipeline
- Inverse training entry
optogpt/run_optogpt.py - Surrogate training entry
optogpt/run_ol_transformer.py - Pair preparation
optogpt/core/datasets/datasets.py - Training and loss
optogpt/core/trains/train.py
Other components
- Researcher
- Structure-spectrum data
- Candidate film designs
Connections 23
- Researcher → Inverse training entry: starts training
- Structure-spectrum data → Pair preparation: loads pairs
- Inverse training entry → Pair preparation: prepares inverse data
- Surrogate training entry → Pair preparation: prepares forward data
- Inverse training entry → Inverse design model: builds model
- Surrogate training entry → Forward surrogate: builds model
- Inverse design model → Transformer models: uses components
- Forward surrogate → Transformer models: uses components
- Inverse training entry → Training and loss: trains inverse model
- Surrogate training entry → Training and loss: trains surrogate
- Researcher → OOD spectrum generator: requests OOD data
- OOD spectrum generator → Thin-film simulator: simulates designs
- Researcher → Augmentation preparation: prepares augmentation
- Augmentation preparation → Inverse design model: loads checkpoint
- Augmentation preparation → Thin-film simulator: evaluates decoded designs
- Design perturbation → Thin-film simulator: scores perturbations
- Optical constants → Thin-film simulator: supplies optical constants
- Augmented data tools → Model retraining: provides training data
- Improvement runner → Augmentation preparation: coordinates
- Improvement runner → Design perturbation: coordinates
- Improvement runner → Augmented data tools: coordinates
- Improvement runner → Model retraining: coordinates
- Training and loss → Candidate film designs: saves trained checkpoint