Abstract
Researchers at Oak Ridge National Laboratory have conducted the first controlled, head-to-head comparison of GPT-NeoX and LLaMA architectures by training them from scratch on the Frontier exascale supercomputer. Using a massive 15-billion-token materials science corpus, they developed MatGPT, the largest foundation model for materials science to date. The study demonstrates that integrating LLM embeddings with Graph Neural Networks (GNNs) establishes a new state-of-the-art for predicting physical properties like band gaps.
Introduction
The rapid expansion of Large Language Models (LLMs) has provided researchers with numerous architectural choices, such as GPT-3, LLaMA, and Falcon. However, because these models are typically trained on disparate datasets with varying preprocessing steps, it is difficult to determine whether performance gains stem from architectural innovations or data quality.
Furthermore, while LLMs excel in general-purpose tasks, the scientific community—particularly in materials science—lacks large-scale foundation models. This study provides a controlled experiment for LLM architectures while building a specialized tool for scientific discovery on high-performance computing (HPC) platforms.
Architectural Methodology
The team compared two dominant open-source architectures: GPT-NeoX and LLaMA. While both are decoder-only Transformers, they differ significantly in their internal components, specifically their normalization layers and activation functions. GPT-NeoX utilizes LayerNorm and GELU activation, whereas LLaMA employs RMSNorm and SwiGLU (SILU) activation.
To optimize these architectures for Frontier's AMD MI250X GPUs, the researchers implemented several technical innovations:
- Flash Attention Porting: They ported Flash Attention (v1 and v2) to the ROCm stack, reducing memory complexity from quadratic to linear.
- Large-Batch Training: The LAMB optimizer was used to maintain stability when training with massive batch sizes of up to 4 million tokens.
- Hardware-Aware Design: A systematic sweep of layer counts and hidden sizes revealed that attention head dimensions should be multiples of 8 to fully leverage GPU matrix cores.
Scientific Application: MatGPT and GNN Integration
The models were pre-trained on a custom 15-billion-token corpus curated from 26.5 million abstracts and 0.3 million full-text articles. Beyond standard text generation, the researchers explored the power of LLM embeddings as feature extractors for downstream scientific tasks.
By concatenating LLM text embeddings of chemical formulas with structural data processed by a Graph Neural Network (GNN), the team developed a hybrid workflow for property prediction. This approach leverages the LLM's learned chemical nomenclature alongside the GNN's understanding of physical structure.
Key Results and Performance
- Architectural Edge: Under identical conditions, LLaMA generally achieved lower training loss and superior downstream performance, suggesting its architectural refinements (like SwiGLU) provide a genuine advantage over the NeoX baseline.
- Computational Efficiency: The team achieved a training throughput of 84 TFLOPS per GCD, roughly 43% of the theoretical peak of the MI250X hardware, with 88% scaling efficiency across 256 GPUs.
- Scientific Breakthrough: The MatGPT-augmented GNN achieved a Mean Absolute Error (MAE) of 0.197 for band gap prediction, representing an 8% improvement over the previous state-of-the-art (MF-CGNN).
- Memory Management: Flash Attention proved essential for long-context tasks; without it, models encountered Out-of-Memory (OOM) errors at sequence lengths beyond 8,192 tokens.
Conclusion
This study provides a robust roadmap for developing scientific LLMs on HPC infrastructure. While LLaMA showed a slight performance edge, the integration of LLM embeddings with structural GNNs proved to be the most significant driver for scientific accuracy. Future work will focus on scaling beyond 6.7B parameters, further optimizing ROCm-based kernels, and expanding MatGPT to include multi-modal scientific data.
Summary updated