Proceedings of ESCAPE 35ISSN: 2818-4734
Volume: 4 (2025)
Table of Contents
LAPSE:2025.0426v1
Published Article
LAPSE:2025.0426v1
Text2Model: Generating dynamic chemical reactor models using large language models (LLMs)
Sophia Rupprecht, Yassine Hounat, Monisha Kumar, Giacomo Lastrucci, Artur M. Schweidtmann
June 27, 2025
Abstract
As large language models have shown remarkable capabilities in conversing via natural language, the question arises in which way LLMs could potentially assist chemical engineers in research and industry with domain-specific tasks. We generate dynamic chemical reactor models in Modelica code format from textual descriptions as user input. We fine-tune Llama 3.1 8B Instruct on synthetically generated Modelica code for different reactor scenarios. We compare the performance of our fine-tuned model to the baseline Llama 3.1 8B Instruct model as well as GPT4o. We manually assess the models' predictions regarding the syntactic and semantic accuracy of the generated dynamic models. We find that considerable improvements are achieved by the fine-tuned model with respect to both the semantic and the syntactic accuracy of the Modelica models. However, the fine-tuned model lacks a satisfactory ability to generalize to unseen scenarios compared to GPT4o.
Keywords
Large language models, supervised fine-tuning, Text2Model
Suggested Citation
Rupprecht S, Hounat Y, Kumar M, Lastrucci G, Schweidtmann AM. Text2Model: Generating dynamic chemical reactor models using large language models (LLMs). Systems and Control Transactions 4:1706-1711 (2025) https://doi.org/10.69997/sct.165009
Author Affiliations
Rupprecht S: Delft University of Technology, Department of Chemical Engineering, Process Intelligence Research Group, Van der Maasweg 9, 2629 HZ, Delft, The Netherlands
Hounat Y: Delft University of Technology, Department of Chemical Engineering, Process Intelligence Research Group, Van der Maasweg 9, 2629 HZ, Delft, The Netherlands
Kumar M: Delft University of Technology, Department of Chemical Engineering, Process Intelligence Research Group, Van der Maasweg 9, 2629 HZ, Delft, The Netherlands
Lastrucci G: Delft University of Technology, Department of Chemical Engineering, Process Intelligence Research Group, Van der Maasweg 9, 2629 HZ, Delft, The Netherlands
Schweidtmann AM: Delft University of Technology, Department of Chemical Engineering, Process Intelligence Research Group, Van der Maasweg 9, 2629 HZ, Delft, The Netherlands
Journal Name
Systems and Control Transactions
Volume
4
First Page
1706
Last Page
1711
Year
2025
Publication Date
2025-07-01
Version Comments
Original Submission
Other Meta
PII: 1706-1711-1241-SCT-4-2025, Publication Type: Journal Article
Record Map
Published Article

LAPSE:2025.0426v1
This Record
External Link

https://doi.org/10.69997/sct.165009
Article DOI
Download
Files
Jun 27, 2025
Main Article
License
CC BY-SA 4.0
Meta
Record Statistics
Record Views
1237
Version History
[v1] (Original Submission)
Jun 27, 2025
 
Verified by curator on
Jun 27, 2025
This Version Number
v1
Citations
Most Recent
This Version
URL Here
https://psecommunity.org/LAPSE:2025.0426v1
 
Record Owner
PSE Press
Links to Related Works
Directly Related to This Work
Article DOI
References Cited
  1. Jacobs PF, Pollice R. Developing large language models for quantum chemistry simulation input generation. ChemRxiv preprint (2024) https://doi.org/10.26434/chemrxiv-2024-9g2w2
  2. Nijkamp E, Pang B, Hayashi H, Tu L, Wang H, Zhou Y, Savarese S, Xiong C. Codegen: An open large language model for code with multi-turn program synthesis. arxiv preprint (2022)
  3. Wang Y, Le H, Gotmare AD, Bui NDQ, Li J, Hoi SCH. Codet5+: Open code large language models for code understanding and generation. arxiv preprint (2023) https://doi.org/10.18653/v1/2023.emnlp-main.68
  4. Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P, Neelakantan A, Shyam P, Sastry G, Askell A, Agarwal S, Herbert-Voss A, Krueger G, Henighan T, Child R, Ramesh A, Ziegler DM, Wu J, Winter C, Hesse C, Chen M, Sigler E, Litwin M, Gray S, Chess B, Clark J, Berner C, McCandlish S, Radford A, Sutskever I, Amodei D. Language models are few-shot learners. arxiv preprint (2020)
  5. Wei J, Bosma M, Zhao VY, Guu K, Yu AW, Lester B, Du N, Dai AM, Le QV. Finetuned language models are zero-shot learners. arxiv preprint (2021)
  6. Hu EJ, Shen Y, Wallis P, Allen-Zhu Z, Li Y, Wang S, Wang L, Chen W. Lora: Low-rank adaptation of large language models. arxiv preprint (2021)
  7. Hugging Face. meta-llama/llama-3.1-8b-instruct. https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct
  8. Lewis P, Perez E, Piktus A, Petroni F, Karpukhin V, Goyal N, Küttler H, Lewis M, Yih W-T, Rocktäschel T, Riedel S, Kiela D. Retrieval-augmented generation for knowledge-intensive nlp tasks. arxiv preprint (2020)
(0.11 seconds)

[0.11 s]