How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="Belnadino/SmartHome-AI-IoT-Generator")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("Belnadino/SmartHome-AI-IoT-Generator")
model = AutoModelForSequenceClassification.from_pretrained("Belnadino/SmartHome-AI-IoT-Generator", device_map="auto")
Quick Links

SmartHome-AI-IoT Generator Model

Overview

The SmartHome-AI-IoT Generator Model generates executable smart-home device actions from natural language commands and contextual information.

The model performs multi-label classification, allowing a single user command to control multiple IoT devices simultaneously.

Example:

Input: Prepare the bedroom for sleeping Location: Bedroom Time: Night Temperature: 18°C

Output: AC_OFF Curtains_CLOSE BedLamp_OFF TV_OFF Radio_OFF AirPurifier_ON

Authors

Belnadino Mgimba
Department of Computer Science, Durham University, Durham, United Kingdom

Anish Jindal
Department of Computer Science, Durham University, Durham, United Kingdom

Project

This model is part of the:

SmartHome-AI-IoT Framework
"A Natural Language Understanding, Low-Latency, Context-Aware, Multi-Device Control and Self-Learning SmartHome IoT Framework"

Developed for research on:

  • Natural language understanding for IoT
  • Context-aware smart-home automation
  • Edge AI deployment
  • Human-in-the-loop adaptive systems

Intended Use

Applications include:

  • Smart-home automation
  • Natural language IoT control
  • Multi-device orchestration
  • Edge AI systems

Model Architecture

  • Base model: DistilBERT
  • Task: Multi-label classification
  • Framework: PyTorch + Transformers

The model predicts device-action labels:

Examples: Light_ON Light_OFF AC_ADJUST Curtains_OPEN Curtains_CLOSE

Dataset

Trained using:

SmartHomeIoTNLU Dataset

Dataset includes:

  • 200,320 smart-home events
  • 19 IoT devices
  • 5 rooms
  • 23 scenarios
  • Natural language commands
  • Environmental context

Training Configuration

  • Base model: distilbert-base-uncased

  • Maximum sequence length: 64

  • Batch size: 16

  • Learning rate: 2e-5

  • Optimizer: AdamW

  • Epochs: 3

  • Loss: Binary Cross Entropy

Performance

Metric Value
Accuracy 0.9839
F1 samples 0.9946
F1 micro 0.9978
Jaccard Score 0.9920
Hamming Loss 0.0004

Deployment

The model is designed for deployment in edge-based smart-home systems.

Deployment components:

  • Raspberry Pi gateway
  • Smartphone controller
  • ESP32 IoT devices

Limitations

  • Dataset is synthetically generated.
  • Performance may vary with real household commands.
  • Additional adaptation may be required for new devices.

Citation

SmartHome-AI-IoT Framework

License

apache-2.0

Downloads last month
7
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support