All models

CrystaLLM

GPT-style language model that generates crystal structures as CIF text, one token at a time.

Molecules, proteins and genomics · 257 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (24 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
25.9M
Operations
257
Framework
PyTorch
Recurrent
No
Published
Nature Communications 2024
Cited by
18 (as of 25 October 2026)
Authors
Luis M. Antunes, Keith T. Butler, Ricardo Grau-Crespo
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m15490
Graph hash
dd67256ac2b6b5ec6eb9cdf6569608b861967f45194fba0f5e4624f9183ba4f5
Skeleton hash
44f7eb159b7431a6a18a022cb8337672f391f50b0ee04a1bb5a11687d175fc60
Architecture hash
1a3d8a5341c2f29ec8c3f8eda5b5fd2eb461dddd5d57221b023c4c4ef13000b3
Diagram SHA-256
6d733ef2a45c0b0c95cfc6691e786d5503132c591ac3bd8d1c0b72a20b0d57b9
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

CrystaLLM is a language model for crystal structures, a Transformer-based, decoder-only model of the Crystallographic Information File (CIF) text format, trained to predict the next token. The motivation is that generating a plausible crystal structure is often the first step in predicting the structure and properties of a material from its chemical composition.

The model is trained directly on the standardized and tokenized text of the files, not on structural representations derived from them. Its vocabulary has 371 symbols, covering CIF tags, space group symbols, element symbols, numeric digits and punctuation. The network is a GPT-style stack of transformer blocks, with an implementation based on the nanoGPT project. The paper describes a small model with 8 transformer blocks, 8 attention heads, an embedding size of 512 and a block size of 1,024, which it reports at 25 million parameters.

Once trained, the model generates a crystal structure for a given composition and, optionally, a space group. The authors also combine it with a formation energy predictor and Monte Carlo Tree Search, which they report improves the validity rate and generally gives lower-energy structures than random sampling. The training structures were assembled from the Materials Project, the OQMD and NOMAD.

Key idea. CrystaLLM shows that an autoregressive language model trained on CIF text can generate plausible crystal structures for inorganic compounds unseen in training.

  • CrystaLLM
  • crystal structure generation
  • crystal structure prediction
  • CIF language model
  • crystallographic information file
  • materials discovery
  • inorganic crystals
  • autoregressive language model
  • nanoGPT

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{antunes2024crystalstructuregenerationautoregressive,
      title={Crystal Structure Generation with Autoregressive Large Language Modeling}, 
      author={Luis M. Antunes and Keith T. Butler and Ricardo Grau-Crespo},
      year={2024},
      eprint={2307.04340},
      archivePrefix={arXiv},
      primaryClass={cond-mat.mtrl-sci},
      url={https://arxiv.org/abs/2307.04340}, 
}