EPlus-LLM commited on
Commit
b17e038
Β·
verified Β·
1 Parent(s): 6bc025f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +103 -23
README.md CHANGED
@@ -53,32 +53,112 @@ This current platform is designed for engineers, architects, and researchers wor
53
 
54
  ## πŸš€ Quick Start
55
 
56
- This repository contains v2 and v1 of EPlus-LLM, along with implementation details for the ABEM reference.
57
-
58
-
59
- πŸ“‚ Repository Structure
60
-
61
- ```
62
- ── README.md # Project documentation
63
- ── v2 # V2 model for complex ABEM scenarios in real-world
64
- ── v1 # V1 model for simple ABEM scenarios
65
- ── requirements.txt # Dependencies for this project
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ```
67
 
68
- πŸ”§ Installation
69
 
70
- - Clone the repository:
71
- ```
72
- git clone https://github.com/Gangjiang1/EPlus-LLM.git
73
- cd EPlus-LLM
74
- ```
75
- - Install required dependencies:
76
- ```
77
- pip install -r requirements.txt
78
- ```
79
 
80
- ▢️ Running Auto-Building Energy Modeling via EPlus-LLM
81
  ```
82
- cd v2
83
- python EPlus-LLM/v2/Inference.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ```
 
53
 
54
  ## πŸš€ Quick Start
55
 
56
+ Here provides a code snippet to show you how to load the EPlus-LLM and auto-generate building energy models.
57
+
58
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/EPlus-LLM/EPlus-LLMv1/blob/main/Run_EPlus-LLM.ipynb)
59
+
60
+ ```python
61
+ # ⚠️ Please make sure you have adequate GPU memory.
62
+ # ! pip install -U bitsandbytes -q
63
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
64
+ import torch
65
+ from peft import PeftModel, PeftConfig
66
+
67
+ # Load the rest port of IDF file.
68
+ file_path = "v2_nextpart.idf"
69
+ output_path = "v2_final.idf"
70
+
71
+ # Load the EPlus-LLMv2 config.
72
+ peft_model_id = "EPlus-LLM/EPlus-LLMv2"
73
+ config = PeftConfig.from_pretrained(peft_model_id)
74
+
75
+ # Load the base LLM, flan-t5-xxl, and tokenizer
76
+ model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-xxl", load_in_8bit=True)
77
+ tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-xxl")
78
+
79
+ # Load the Lora model
80
+ model = PeftModel.from_pretrained(model, peft_model_id)
81
+
82
+ # Generation config
83
+ generation_config = model.generation_config
84
+ generation_config.max_new_tokens = 5000
85
+ generation_config.temperature = 0.1
86
+ generation_config.top_p = 0.1
87
+ generation_config.num_return_sequences = 1
88
+ generation_config.pad_token_id = tokenizer.eos_token_id
89
+ generation_config.eos_token_id = tokenizer.eos_token_id
90
+
91
+ # Please provide your input here β€” a description of the desired building
92
+ # For more details, please refer to the paper: https://doi.org/10.1016/j.autcon.2025.106223
93
+ input=f"""
94
+ Simulate a U-shaped building that is 99.73 meters high, with a gable roof.
95
+ The horizontal segment is 732.31 meters long and 17.54 meters wide.
96
+ The left vertical segment is 256.31 meters long and 206.96 meters wide.
97
+ The right vertical segment is 431.54 meters long and 62 meters wide.
98
+ The roof ridge is 8.77 meters to the length side of the horizontal segment, and 128.16 meters, 215.77 meters to the width side of the vertical segments, respectively.
99
+ The attic height is 139.71 meters. The building orientation is 62 degrees to the north.
100
+ The building has 3 thermal zones with each segment as one thermal zone.
101
+ The window-to-wall ratio is 0.32. The window sill height is 33.91 meters, the window height is 65.82 meters, and the window jamb width is 0.01 meters.
102
+ The window U-factor is 6.36 W/m2K and the SHGC is 0.89. The wall is made of wood, with a thickness of 0.48 meters and the wall insulation is RSI 1.6 m2K/W, U-factor 0.63 W/m2K.
103
+ The roof is made of metal, with a thickness of 0.09 meters and the roof insulation is RSI 5.4 m2K/W, U-factor 0.19 W/m2K.
104
+ The floor is made of concrete, covered with carpet. The ventilation rate is 2.32 ach. The infiltration rate is 0.55 ach.
105
+ The people density is 16.61 m2/person, the light density is 4.48 W/m2, and the electric equipment density is 22.63 W/m2.
106
+ Occupancy starts at 7:00 and ends at 18:00. The occupancy rate is 1. The unoccupancy rate is 0.3.
107
+ The heating setpoint is 21.54 Celsius in occupancy period and 15.86 Celsius in unoccupancy period.
108
+ The cooling setpoint is 22.6 Celsius in occupancy period and 26.72 Celsius in unoccupancy period.
109
+ """
110
+ input_ids = tokenizer(input, return_tensors="pt", truncation=False)
111
+ generated_ids = model.generate(input_ids = input_ids.input_ids,
112
+ attention_mask = input_ids.attention_mask,
113
+ generation_config = generation_config)
114
+ generated_output = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
115
+
116
+ # print(generated_output)
117
+
118
+ # Output the building energy model in IDF file
119
+ with open(file_path, 'r', encoding='utf-8') as file:
120
+ nextpart = file.read()
121
+ final_text = nextpart + "\n\n" + generated_output
122
+ with open(output_path, 'w', encoding='utf-8') as f:
123
+ f.write(final_text)
124
+ print(f"Building Energy Model Auto-Generated: {output_path}")
125
  ```
126
 
127
+ ## πŸ“ Citation
128
 
129
+ If you find our work helpful, feel free to give us a cite.
 
 
 
 
 
 
 
 
130
 
 
131
  ```
132
+ @article{jiang2025EPlus-LLMv2,
133
+ author = {Gang Jiang and Jianli Chen},
134
+ title = {Efficient fine-tuning of large language models for automated building energy modeling in complex cases},
135
+ journal = {Automation in Construction},
136
+ volume = {175},
137
+ pages = {106223},
138
+ year = {2025},
139
+ month = {July},
140
+ doi = {https://doi.org/10.1016/j.autcon.2025.106223}
141
+ }
142
+
143
+ @article{jiang2025prompting,
144
+ author = {Gang Jiang and Zhihao Ma and Liang Zhang and Jianli Chen},
145
+ title = {Prompt engineering to inform large language models in automated building energy modeling},
146
+ journal = {Energy},
147
+ volume = {316},
148
+ pages = {134548},
149
+ year = {2025},
150
+ month = {Feb},
151
+ doi = {https://doi.org/10.1016/j.energy.2025.134548}
152
+ }
153
+
154
+ @article{jiang2025EPlus-LLM,
155
+ author = {Gang Jiang and Zhihao Ma and Liang Zhang and Jianli Chen},
156
+ title = {Prompt engineering to inform large language models in automated building energy modeling},
157
+ journal = {Applied Energy},
158
+ volume = {367},
159
+ pages = {123431},
160
+ year = {2024},
161
+ month = {Aug},
162
+ doi = {https://doi.org/10.1016/j.apenergy.2024.123431}
163
+ }
164
  ```