The final XRD pattern was generated by summing the corrected intensities over all relevant reflections. All calculations were performed using custom scripts in the JARVIS-tools package to simulate the diffraction patterns for comparison with experimental data. Such XRD predictions were carried out for all the data in the JARVIS-DFT (JDFT) dataset. The XRD dataset was split into a 90:10 ratio for training and testing the Diffract-GPT models. This requires fine-tuning LLM models such as Mistral AI, which are based on transformer architecture. Each transformer block contains two main components: a multihead self-attention mechanism and a position-wise feed-forward network. The input to the model is a sequence of tokens, which are first converted into embeddings and then passed through the transformer blocks. The scaled dot-product attention used in a transformer model can be written as: