Instructions to use meftah416/gemma-eppy-270m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meftah416/gemma-eppy-270m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="meftah416/gemma-eppy-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meftah416/gemma-eppy-270m") model = AutoModelForCausalLM.from_pretrained("meftah416/gemma-eppy-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use meftah416/gemma-eppy-270m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meftah416/gemma-eppy-270m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meftah416/gemma-eppy-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/meftah416/gemma-eppy-270m
- SGLang
How to use meftah416/gemma-eppy-270m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "meftah416/gemma-eppy-270m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meftah416/gemma-eppy-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "meftah416/gemma-eppy-270m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meftah416/gemma-eppy-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use meftah416/gemma-eppy-270m 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/gemma-eppy-270m 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/gemma-eppy-270m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for meftah416/gemma-eppy-270m to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="meftah416/gemma-eppy-270m", max_seq_length=2048, ) - Docker Model Runner
How to use meftah416/gemma-eppy-270m with Docker Model Runner:
docker model run hf.co/meftah416/gemma-eppy-270m
Gemma-3-270M Fine-tuned for EnergyPlus & eppy
Developed by: meftah416
Model License: apache-2.0
Base Model: unsloth/gemma-3-270m-it
This model was trained 2x faster with Unsloth ⚡
Model Overview
A specialized Gemma-3-270M model fine-tuned on EnergyPlus building simulation and eppy Python API tasks. This model understands and generates text related to building energy simulation, HVAC systems, thermal zones, schedules, and eppy scripting.
Key Features
- ✨ Fine-tuned on 2,700 high-quality training examples
- ✅ Validated on 300 test examples
- 🚀 2x faster training with Unsloth
- 💾 Lightweight (270M parameters)
- 🎯 Domain-specific for EnergyPlus + eppy
Training Details
| Metric | Value |
|---|---|
| Base Model | unsloth/gemma-3-270m-it |
| Training Samples | 2,700 |
| Validation Samples | 300 |
| Total Data | 3,000 examples |
| Data Source | Self-created |
| Domain | EnergyPlus IDF + eppy Python |
| Batch Size | 2 |
| Learning Rate | 2e-5 |
| Optimizer | adamw_8bit |
| Epochs | 1 |
| Max Sequence Length | 2600 |
| Training Framework | Unsloth + TRL (SFTTrainer) |
| Precision | float16 |
Model Capabilities
This model is trained to handle:
EnergyPlus Tasks
- Generate EnergyPlus IDF snippets from descriptions
- Explain EnergyPlus object syntax
- Create thermal zone definitions
- Define HVAC system configurations
- Generate occupancy and schedule objects
eppy Tasks
- Generate eppy Python code for building simulations
- Explain eppy API usage
- Create building objects programmatically
- Manipulate IDF files with eppy
Usage
Basic Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("meftah416/gemma-eppy-270m")
tokenizer = AutoTokenizer.from_pretrained("meftah416/gemma-eppy-270m")
# Create messages in correct format
messages = [
{"role": "system", "content": "Set infiltration to 0.4 ACH"},
{"role": "user", "content": ""},
]
# Apply chat template (IMPORTANT!)
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
).removeprefix('<bos>')
# Generate
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=2600)
result = tokenizer.decode(outputs[0])
Save to model README on Hub
Performance
- Inference Speed: ~50-100 tokens/sec (A10 GPU)
- Memory Usage: 3-4 GB VRAM (float16)
- Context Window: 8192 tokens
Limitations
⚠️ Always validate generated EnergyPlus IDF files before running simulations. Model may occasionally generate incorrect syntax.
License
Apache 2.0 License
Created by: meftah416
- Downloads last month
- 171
