An open-source multi-modal toolbox for extracting structured synthesis procedures and performance data from materials science literature at scale. This repository contains the implementations of LeMat-Synth v1.0 (published on the arXiv and presented at NeurIPS AI4Mat 2025) plus the extendable codebase for usecases in materials science.
Installation Instructions
This project uses uv as a package & project manager. See uv's README for installation instructions.
# 1. Clone & enter the repo
git clone https://github.com/LeMaterial/lematerial-llm-synthesis.git
cd lematerial-llm-synthesis
# 2. (First time only) create & seed venv
uv venv -p 3.11 --seed
# 3. Install dependencies & package
uv sync && uv pip install -e .macOS/Linux
```bash cp .env.example .env # Edit `.env` to add: # MISTRAL_API_KEY=your_api_key # if using Mistral models and Mistral OCR # OPENAI_API_KEY=your_api_key # if using OpenAI models # GEMINI_API_KEY=your_api_key # if using Gemini models # ANTHROPIC_API_KEY=your_api_key # if using Anthropic models (Claude, image extraction) ```Before running the scripts, you need to load your API keys. For this you need to source the .env file. Run:
source .envWindows
- Search bar → Edit the system environment variables → Advanced → click "Environment Variables..."
- Under "User variables for " click "New" and add each:
- Variable name:
MISTRAL_API_KEY; Value:your_api_key - Variable name:
OPENAI_API_KEY; Value:your_api_key - Variable name:
GEMINI_API_KEY; Value:your_api_key - Variable name:
GOOGLE_APPLICATION_CREDENTIALS; Value:C:\path\to\service-account.json
- Variable name:
Note: For any platform you can always load .env-style keys in code via os.environ.get(...).
uv run python -c "import llm_synthesis"No errors? You're all set!
Fetching HuggingFace Dataset LeMat-Synth
The data is hosted as a LeMaterial Dataset on HuggingFace: LeMat-Synth
- Apply for access (request will be instantly approved)
- Install HuggingFace CLI (guide)
- Recommended:
pip install -U "huggingface_hub[cli]" - Or (macOS):
brew install huggingface-cli
- Recommended:
- Login with access token:
huggingface-cli login
- LeMat-Synth: Synthesis procedures and images in structured (per-synthesis) format
- LeMat-Synth-Papers: Intermediate dataset storing papers in per-paper format
uv run examples/scripts/extract_synthesis_procedure_from_text.py \
data_loader=default \
synthesis_extraction=default \
material_extraction=default \
judge=default \
result_save=defaultuv run examples/scripts/extract_synthesis_procedure_from_text.py \
data_loader=local \
data_loader.architecture.data_dir="/path/to/markdown" \
synthesis_extraction=default \
material_extraction=default \
judge=default \
result_save=defaultWork in Progress
Work in Progress
Work in Progress
Filter down:
uv run examples/scripts/case_study_thermocatalysis/keyword_search.py
uv run examples/scripts/case_study_thermocatalysis/downsample_with_llm.py --prompt default
uv run examples/scripts/case_study_thermocatalysis/downsample_with_llm.py --prompt longCite us:
@article{lederbauer2025lemat,
title={LeMat-Synth: a multi-modal toolbox to curate broad synthesis procedure databases from scientific literature},
author={Lederbauer, Magdalena and Betala, Siddharth and Li, Xiyao and Jain, Ayush and Sehaba, Amine and
Channing, Georgia and Germain, Gr{\'e}goire and Leonescu, Anamaria and Flaifil, Faris and
Amayuelas, Alfonso and Nozadze, Alexandre and Schmid, Stefan P. and Zaki, Mohd
and Ethirajan, Sudheesh Kumar and Pan, Elton and Franckel, Mathilde
and Duval, Alexandre and Krishnan, N. M. Anoop and Gleason, Samuel P.},
journal={arXiv preprint arXiv:2510.26824},
year={2025}
}
