đ Home 3B
The "Home" model is a fine - tuned version of Microsoft's Phi - 2 model. It can control household devices and perform basic question - answering tasks. The fine - tuning dataset combines the Cleaned Stanford Alpaca Dataset and a custom curated dataset designed to teach the model function calling.
The model is quantized using Lama.cpp, enabling it to run in extremely low - resource environments, which are common in Home Assistant installations like Raspberry Pis. It can be used as an "instruct" type model with the ChatML prompt format. The system prompt provides information about the Home Assistant installation, including available devices and callable services.
đ Quick Start
System Prompt Example
You are 'Al', a helpful AI Assistant that controls the devices in a house. Complete the following task as instructed with the information provided only.
Services: light.turn_off, light.turn_on, fan.turn_on, fan.turn_off
Devices:
light.office 'Office Light' = on
fan.office 'Office fan' = off
light.kitchen 'Kitchen Light' = on
Model Output Format
The model's output includes a response for the user and an optional code block to invoke Home Assistant "services". The output format for function calling is as follows:
turning on the kitchen lights for you now
```homeassistant
light.turn_on(light.kitchen)
```
Basic Instruct and QA
Due to the mixed data used in fine - tuning, the model can handle basic instruct and QA tasks. For example:
user if mary is 7 years old, and I am 3 years older than her. how old am I?
assistant If Mary is 7 years old, then you are 10 years old (7+3=10).
⨠Features
- Device Control: Capable of controlling household devices.
- Question - Answering: Can perform basic question - answering tasks.
- Low - Resource Compatibility: Quantized for running in low - resource environments.
- Function Calling: Supports function calling using a specific output format.
đĻ Installation
Not provided in the original document, so this section is skipped.
đģ Usage Examples
Basic Usage
user if mary is 7 years old, and I am 3 years older than her. how old am I?
assistant If Mary is 7 years old, then you are 10 years old (7+3=10).
Advanced Usage
turning on the kitchen lights for you now
```homeassistant
light.turn_on(light.kitchen)
## đ Documentation
### Training
The model was trained as a LoRA on an RTX 3090 (24GB) using a custom training script with gradient checkpointing enabled. The LoRA has a rank of 32, an alpha of 64, targets the `fc1,fc2,Wqkv,out_proj` modules, and "saves" the `wte,lm_head.linear` modules. The embedding weights were "saved" and trained normally with the rank matrices to train the newly added tokens to the embeddings. The full model is merged at the end.
### Datasets
- Snythetic Dataset for SFT - https://github.com/acon96/home - llm
- Stanford Alpaca Cleaned - https://huggingface.co/datasets/yahma/alpaca - cleaned
## đ§ Technical Details
The model is based on the fine - tuning of Microsoft's Phi - 2 model. It uses a combination of datasets for fine - tuning and is quantized using Lama.cpp for low - resource compatibility. The LoRA training method is employed with specific hyperparameters and module targeting.
## đ License
This model is a fine - tuned version of the Microsoft Phi model series (MIT License) and uses datasets licensed under CC BY - NC - 4.0. Therefore, this model is released under the same non - commercial Creative Commons License. The fine - tuned model is shared FOR RESEARCH PURPOSES ONLY and should not be used commercially.
| Property | Details |
|----------|---------|
| Model Type | Fine - tuned version of Microsoft's Phi - 2 model |
| Training Data | Snythetic Dataset for SFT (https://github.com/acon96/home - llm), Stanford Alpaca Cleaned (https://huggingface.co/datasets/yahma/alpaca - cleaned) |