c-bone commited on
Commit
0083401
·
verified ·
1 Parent(s): b7f85b9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ library_name: transformers
6
+ tags:
7
+ - materials-science
8
+ - crystallography
9
+ - generative-ai
10
+ - inverse-design
11
+ - chemistry
12
+ datasets:
13
+ - c-bone/mattergen_den_ehull
14
+ base_model: c-bone/CrystaLLM-pi_base
15
+ pipeline_tag: text-generation
16
+ ---
17
+
18
+ # Model Card for CrystaLLM-pi_density
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+
24
+ **CrystaLLM-pi_density** is a conditional generative model designed for the inverse design of inorganic crystalline materials. It is a fine-tuned version of the `CrystaLLM-pi` framework, based on a GPT-2 decoder-only architecture. This specific variant employs the **Property-Key-Value (PKV)** attention mechanism (referred to as "Prefix attention" in the associated preprint) to condition the generation of Crystallographic Information Files (CIFs) on physical density and thermodynamic stability.
25
+
26
+ The model generates crystal structures (cell parameters and atomic positions) based on two target scalar properties:
27
+ 1. **Density** ($g/cm^3$)
28
+ 2. **Energy above convex hull** ($E_{hull}$, eV/atom) - a proxy for thermodynamic stability.
29
+
30
+ - **Developed by:** Bone et al. (University College London)
31
+ - **Model type:** Autoregressive Transformer with Prefix Attention Conditioning
32
+ - **Language(s):** CIF (Crystallographic Information File) syntax
33
+ - **License:** MIT
34
+ - **Finetuned from model:** `c-bone/CrystaLLM-pi_base`
35
+
36
+ ### Model Sources
37
+
38
+ - **Repository:** [GitHub: CrystaLLM-pi](https://github.com/C-Bone-UCL/CrystaLLM-pi)
39
+ - **Paper:** [Discovery and recovery of crystalline materials with property-conditioned transformers (arXiv:2511.21299)](https://arxiv.org/abs/2511.21299)
40
+ - **Dataset:** [HuggingFace: c-bone/mattergen_den_ehull](https://huggingface.co/datasets/c-bone/mattergen_den_ehull)
41
+
42
+ ## Uses
43
+
44
+ ### Direct Use
45
+
46
+ The model is intended for research in materials science, specifically for generating structures with targeted densities, such as porous materials (low density) or radiation shielding candidates (high density). Users can input a desired density (e.g., 2.0 $g/cm^3$) and a stability criterion to generate candidate crystal structures.
47
+
48
+ ### Out-of-Scope Use
49
+
50
+ - **Organic Materials:** The model was trained exclusively on inorganic crystal structures.
51
+ - **Large Unit Cells:** Due to the context window limit of 1024 tokens, the model cannot reliably generate unit cells containing more than approximately 20 atoms.
52
+ - **Disordered Systems:** The model currently generates ordered structures and does not natively handle partial occupancies.
53
+ - **Production Deployment:** This is a research artifact. Generated structures must be validated via Density Functional Theory (DFT) or other simulation methods before synthesis attempts.
54
+
55
+ ## Bias, Risks, and Limitations
56
+
57
+ - **Training Distribution Bias:** The model is fine-tuned on the MatterGen Density dataset. Performance may degrade for density targets that are outliers in the training distribution (e.g., extremely dense or extremely porous materials).
58
+ - **Validity:** As an autoregressive language model, it may generate syntactically incorrect CIFs or chemically implausible structures. Post-processing validation is required.
59
+
60
+ ## How to Get Started with the Model
61
+
62
+ For instructions on how to load and run generation with this model, please refer to the `_load_and_generate.py` script in the [CrystaLLM-pi GitHub Repository](https://github.com/C-Bone-UCL/CrystaLLM-pi). This script handles the necessary tokenization, property normalization, and prompt construction required to properly condition the model.
63
+
64
+ ## Training Details
65
+
66
+ ### Training Data
67
+
68
+ The model was fine-tuned on the **MatterGen Density** dataset, containing inorganic structures labeled with density and $E_{hull}$ values.
69
+
70
+ - **Source:** Materials Project (via `c-bone/mattergen_den_ehull`)
71
+ - **Preprocessing:** CIFs are augmented, tokenized, and property values are normalized before injection into the attention mechanism.
72
+
73
+ ### Training Procedure
74
+
75
+ - **Architecture:** GPT-2 (Medium, ~61.6M parameters) with additional Property-Key-Value (PKV) encoder layers.
76
+ - **Mechanism:** Continuous property values are projected into the attention mechanism's key-value space (Prefix Tuning), allowing the model to attend to the target properties at every generation step.
77
+
78
+ ## Evaluation
79
+
80
+ ### Metrics
81
+
82
+ The model is evaluated based on:
83
+ 1. **Validity:** Percentage of generated files that are valid CIFs.
84
+ 2. **MAE:** Mean Absolute Error between the target density and the density of the generated structures.
85
+ 3. **VSUN:** A composite metric ensuring structures are Valid, Stable, Unique, and Novel.
86
+
87
+ ### Results
88
+
89
+ As reported in the associated preprint, the Prefix attention mechanism demonstrated superior performance in adhering to density targets compared to sequence-level conditioning baselines.
90
+
91
+ ## Citation
92
+
93
+ ```bibtex
94
+ @misc{bone2025discoveryrecoverycrystallinematerials,
95
+ title={Discovery and recovery of crystalline materials with property-conditioned transformers},
96
+ author={Cyprien Bone and Matthew Walker and Kuangdai Leng and Luis M. Antunes and Ricardo Grau-Crespo and Amil Aligayev and Javier Dominguez and Keith T. Butler},
97
+ year={2025},
98
+ eprint={2511.21299},
99
+ archivePrefix={arXiv},
100
+ primaryClass={cond-mat.mtrl-sci},
101
+ url={[https://arxiv.org/abs/2511.21299](https://arxiv.org/abs/2511.21299)},
102
+ }