Transformers
Safetensors
English
text-generation-inference
unsloth
llama
trl
energyplus
idf-generation
Instructions to use meftah416/EnergyPhi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meftah416/EnergyPhi with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("meftah416/EnergyPhi", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use meftah416/EnergyPhi with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for meftah416/EnergyPhi to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for meftah416/EnergyPhi to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for meftah416/EnergyPhi to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="meftah416/EnergyPhi", max_seq_length=2048, )
ποΈ 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))
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support