πŸ—οΈ Model Card: IDF Reasoning Generator

πŸ“Œ Model Summary

This is the first reasoning model specifically designed for generating EnergyPlus IDF files.
It is also the first decoder-only model developed for structured building energy modeling tasks.

The model takes building parameters (length, width, height, and window-to-wall ratio) as input and produces a valid EnergyPlus IDF file for single-storied rectangular buildings.


πŸ“š Training Details

  • Stage 1 (Supervised Finetuning): 1500 samples of building descriptions β†’ IDF mappings.
  • Stage 2 (Reasoning Finetuning): 2500 reasoning-focused samples to improve logical consistency in geometry-to-IDF translation.
  • Base Model: unsloth/phi-4
  • Frameworks Used: Unsloth + Hugging Face TRL
  • Training Speed: ~2Γ— faster compared to standard Hugging Face pipelines.

πŸš€ Intended Use

  • Primary Task: Automatic generation of EnergyPlus IDF files.
  • Target Users:
    • Building energy modelers
    • Sustainability researchers
    • Engineers and architects experimenting with rapid prototyping
  • Input: Building geometry parameters (length, width, height, WWR).
  • Output: A syntactically correct .idf file ready to run in EnergyPlus.

πŸ” Model Performance

  • Works well for single-storied rectangular buildings.
  • Demonstrates reasoning ability when adjusting geometry to maintain logical consistency (e.g., window placement with WWR).
  • Generates IDF blocks that follow EnergyPlus schema.

⚠️ Limitations:

  • Currently limited to single-storied rectangles.
  • Does not yet handle complex geometries (multi-story, irregular shapes, shading devices).
  • Requires post-validation in EnergyPlus before large-scale use.

πŸ› οΈ Example Usage with Unsloth

from unsloth import FastLanguageModel

# Load model + tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "meftah416/EnergyPhi",
    max_seq_length = 12000,  # supports long contexts
    dtype = None,            # Auto-detect (float16, bfloat16, float32)
    load_in_4bit = True,     # Efficient 4-bit loading
)

# Enable fast generation
FastLanguageModel.for_inference(model)

prompt = """Generate an EnergyPlus IDF file for a single storied rectangle building with the following dimensions:
- Length: 20 m
- Width: 10 m
- Height: 3 m
- Window-to-wall ratio: 0.25
"""

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
    **inputs,
    temperature = 1.5,
    top_p = 0.1,
    max_new_tokens = 12000,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for meftah416/EnergyPhi

Base model

microsoft/phi-4
Finetuned
unsloth/phi-4
Finetuned
(84)
this model