Edit model card

Home 3B

The "Home" model is a fine tuning of the Phi-2 model from Microsoft. The model is able to control devices in the user's house as well as perform basic question and answering. The fine tuning dataset is a combination of the Cleaned Stanford Alpaca Dataset as well as a custom curated dataset designed to teach the model function calling.

The model is quantized using Lama.cpp in order to enable running the model in super low resource environments that are common with Home Assistant installations such as Rapsberry Pis.

The model can be used as an "instruct" type model using the ChatML prompt format. The system prompt is used to provide information about the state of the Home Assistant installation including available devices and callable services.

Example "system" prompt:

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

Output from the model will consist of a response that should be relayed back to the user, along with an optional code block that will invoke different Home Assistant "services". The output format from the model for function calling is as follows:

turning on the kitchen lights for you now
```homeassistant
light.turn_on(light.kitchen)
```

Due to the mix of data used during fine tuning, the model is also capable of basic instruct and QA tasks. For example, the model is able to perform basic logic tasks such as the following:

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).

Training

The model was trained as a LoRA on an RTX 3090 (24GB) using a custom training script to enable gradient checkpointing. The LoRA has rank = 32, alpha = 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 along with the rank matricies in order to train the newly added tokens to the embeddings. The full model is merged together at the end.

Datasets

Snythetic Dataset for SFT - https://github.com/acon96/home-llm
Stanford Alpaca Cleaned - https://huggingface.co/datasets/yahma/alpaca-cleaned

License

This model is a fine-tuning of the Microsoft Phi model series (MIT License) and utilizes datasets thare are licensed under CC BY-NC-4.0. As such this model is released under the same non-commerical Creative Commons License. The fine-tuned model is shared FOR RESEARCH PURPOSES ONLY. It is not to be used in any sort of commercial capacity.

Downloads last month
41
GGUF
Model size
2.78B params
Architecture
phi2

2-bit

3-bit

4-bit

5-bit

8-bit

Inference Examples
Unable to determine this model's library. Check the docs .

Dataset used to train acon96/Home-3B-v1-GGUF

Collection including acon96/Home-3B-v1-GGUF