Safetensors
science
material
inverse
design
File size: 3,209 Bytes
fdaed7c
 
 
 
 
 
8d95b1e
 
 
 
 
fdaed7c
 
687fe0a
 
87e901f
 
fbaade6
1d43ac6
 
 
 
fbaade6
 
 
 
687fe0a
fbaade6
687fe0a
 
 
fdaed7c
 
 
fbaade6
 
 
 
 
 
 
 
 
 
852a086
 
 
 
 
 
 
fbaade6
fdaed7c
852a086
 
 
 
a9bdc2c
55b83fa
852a086
 
 
 
 
 
 
 
fdaed7c
 
1d43ac6
 
fdaed7c
 
fbaade6
 
fdaed7c
1d43ac6
 
 
 
 
 
 
 
 
fdaed7c
fbaade6
 
687fe0a
 
87e901f
 
 
9ce84df
 
 
687fe0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
license: cc-by-4.0
datasets:
- HZBSolarOptics/MultiLayerThinFilms
metrics:
- mae
tags:
- science
- material
- inverse
- design
---

# OptoGPT++

[![License](https://img.shields.io/badge/Licenses-CC_BY_4.0-green)](./LICENSE)
[![Contact](https://img.shields.io/badge/Contact-SEAOPT-blue)](mailto:SE-AOPT-office@helmholtz-berlin.de)

Meet OptoGPT++ — an enhanced implementation of the OptoGPT, a decoder-only transformer that aims to solve inverse design of multi-layer thin film structures.

**Key Enhancements**

- Inclusion of an **absorption** feature in the model ➕📈
- Increased the maximum **wave length** to 2,000nm 💡
- Longer training time for **better predictive performance** 🤯

**Supporting Material**

**OptoGPT++**: https://github.com/jnitzz/OptoLlama \
**OptoGPT**: https://github.com/taigaoma1997/optogpt \
**ArXiV**: 📝 https://arxiv.org/abs/2304.10294

## Usage

### Install Dependencies

```bash
python -m pip install torch
python -m pip install safetensors
```

### Load Model Checkpoint

```python
from safetensors.torch import load_file

model = OptoGPT()

safetensors_path = "optogpt-model.safetensors"
state_dict = load_file(safetensors_path)
model.load_state_dict(state_dict)
```

## Useful Information

| Stat                | Value       |
| :------------------ | ----------: |
| #Parameters         | 108,381,113 |
| Best validation MAE |      0.0408 |
| Epochs trained      |       1,000 |
| Best epoch.         |         996 |
| Batch size          |         256 |
| n_blocks            |           6 |
| n_heads             |           8 |
| d_model             |       1,024 |
| max_seq_length      |          20 |

## Acknowledgements

This work is supported by the Helmholtz Association Initiative and Networking Fund through the Helmholtz AI platform, and the HAICORE@KIT grant.

## Citations

If you find our work helpful, please feel free to cite as following:

```
@article{ma2024optogpt,
  title={OptoGPT: a foundation model for inverse design in optical multilayer thin film structures},
  author={Ma, Taigao and Wang, Haozhu and Guo, L Jay},
  journal={Opto-Electronic Advances},
  volume={7},
  number={7},
  year={2024},
  publisher={Opto-Electronic Advance},
  doi={10.29026/oea.2024.240062}
}
```

----

<div style="float: left; position: relative; left: 50%; transform: translateX(-50%);">
  <a href="https://www.helmholtz-berlin.de/index_en.html"></a><img src="https://huggingface.co/datasets/HZBSolarOptics/shared-assets/raw/main/logo_hzb.svg" style="height: 80px; float: left; margin: 0 1em"></a>
  <a href="https://www.kit.edu/english/index.php"></a><img src="https://huggingface.co/datasets/HZBSolarOptics/shared-assets/raw/main/logo_kit.svg" style="height: 80px; float: left; margin: 0 1em"></a>
  <a href="https://www.zib.de/"></a><img src="https://huggingface.co/datasets/HZBSolarOptics/shared-assets/resolve/main/logo_zib.png" style="height: 80px; float: left; margin: 0 1em"></a>

  <a href="https://www.helmholtz.ai/"></a><img src="https://huggingface.co/datasets/HZBSolarOptics/shared-assets/raw/main/logo_hai.svg" style="height: 20px; float: left; margin: 2em 0; position: relative; left: 50%; transform: translateX(-50%);"></a>
</div>