File size: 3,609 Bytes
8f5312a
 
 
 
 
a981970
8f5312a
 
 
132748d
ebd341c
 
8f5312a
 
51f37d7
8f5312a
 
 
 
58c72ef
 
 
 
8f5312a
 
5117256
 
8f5312a
 
 
 
 
 
 
5117256
 
 
0d719c5
 
 
 
 
5117256
0d719c5
 
5117256
0d719c5
5117256
 
 
 
 
 
 
97cd1ee
0d719c5
 
 
 
5117256
97cd1ee
 
 
8f5312a
97cd1ee
8f5312a
5117256
 
 
 
 
 
 
75951a8
5117256
 
 
 
 
 
 
 
 
 
75951a8
5117256
 
 
 
 
 
 
 
 
8f5312a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
language:
- en
license: cc-by-nc-4.0
base_model:
- google/flan-t5-large
---

# EPlus-LLM

**Natural Language Interface for Automated Building Energy Modeling via LLMs**  
*A prototype project exploring the use of fine-tuned large language models to automate building energy modeling from natural language input.*

<div align="center">
  <img src="https://huggingface.co/EPlus-LLM/EPlus-LLMv1/resolve/main/EPlus-LLM_graphic.png" alt="Illustration of EPlus-LLMv2 for Auto-building energy modeling" width="700"/>
</div>


## πŸŽ‰ News
- ⚑️ [2025/01/01]: A prompting-based method for auto-building energy modeling has been released.
[Paper here](https://doi.org/10.1016/j.energy.2025.134548).
- πŸ”₯ [2024/05/016]: We first successfully implement natural language-based auto-building modeling by fine-tuning a large language model (LLM).
[Paper here](https://doi.org/10.1016/j.apenergy.2024.123431).

## πŸš€ Key Features
- Scalability: Auto-generates EnergyPlus models, including varying geometry sizes and internal loads.
- Accuracy & Efficiency: Achieves 100% modeling accuracy while reducing manual modeling time by over 95%.
- Interaction & Automation: A user-friendly human-AI interface for seamless model creation and customization.

## πŸ—οΈ Target Users
This current platform is designed for engineers, architects, and researchers working in building performance, sustainability, and resilience. It is especially useful during early-stage conceptual design when modeling decisions have the greatest impact.

## πŸš€ Quick Start

Here provides a code snippet to show you how to load the EPlus-LLM and auto-generate building energy models.

```python
import torch
from transformers import (
    AutoModelForSeq2SeqLM,
    AutoTokenizer,
)

tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-large")
model = AutoModelForSeq2SeqLM.from_pretrained("EPlus-LLM/EPlus-LLMv1")

generation_config = model.generation_config
generation_config.max_new_tokens = 1300
generation_config.temperature = 0.1
generation_config.top_p = 0.1
generation_config.num_return_sequences = 1
generation_config.pad_token_id = tokenizer.eos_token_id
generation_config.eos_token_id = tokenizer.eos_token_id

input="<Your input, description of the desired building.>"
input_ids = tokenizer(input, return_tensors="pt", truncation=False).to(device)
generated_ids = model.generate(input_ids = input_ids.input_ids,
                           attention_mask = input_ids.attention_mask,
                           generation_config = generation_config)

generated_output = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
generated_output = new_tokens.replace("_", " ")
generated_ooutput = new_tokens.replace("|", "\n")

print(generated_output)

```

## πŸ“ Citation

If you find our work helpful, feel free to give us a cite.

```
@article{jiang2025EPlus-LLM,
  author    = {Gang Jiang and Zhihao Ma and Liang Zhang and Jianli Chen},
  title     = {Prompt engineering to inform large language models in automated building energy modeling},
  journal   = {Applied Energy},
  volume    = {367},
  pages     = {123431},
  year      = {2024},
  month     = {Aug},
  doi       = {https://doi.org/10.1016/j.apenergy.2024.123431}
}

@article{jiang2025prompting,
  author    = {Gang Jiang and Zhihao Ma and Liang Zhang and Jianli Chen},
  title     = {Prompt engineering to inform large language models in automated building energy modeling},
  journal   = {Energy},
  volume    = {316},
  pages     = {134548},
  year      = {2025},
  month     = {Feb},
  doi       = {https://doi.org/10.1016/j.energy.2025.134548}
}
```