acon96 commited on
Commit
0c5d989
1 Parent(s): 102c969

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Home-3B-v2.q2_k.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Home-3B-v2.q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Home-3B-v2.q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Home-3B-v2.q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Home-3B-v2.q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Home-3B-v2.q2_k.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:232c3da265f71e5878574c0111cc40c32cec2257baccf2b005636b2c8295c4e4
3
+ size 1109719552
Home-3B-v2.q3_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e4e7ce9910afe3b1edb9f92fd650e0a2c8735aa30364309792845d81f405d24
3
+ size 1432689152
Home-3B-v2.q4_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac232e8f9c7faeebed196ec82bd8af90d7dabe873326db94ab103653d436c99
3
+ size 1737636352
Home-3B-v2.q5_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e754fd751219a12eb515e14f125ac2821b3b70af525382d0dabc811bdd52ad08
3
+ size 2003057152
Home-3B-v2.q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae01acbddfcd80d7603e2d0533125fe33cded0ba62a0dd4d918e07719520eaa1
3
+ size 2958039552
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - yahma/alpaca-cleaned
4
+ license: cc-by-nc-4.0
5
+ language:
6
+ - en
7
+ tags:
8
+ - automation
9
+ - home
10
+ - assistant
11
+ pipeline_tag: text-generation
12
+ ---
13
+ # Home 3B v2
14
+ 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](https://huggingface.co/datasets/yahma/alpaca-cleaned) as well as a [custom curated dataset](https://github.com/acon96/home-llm) designed to teach the model function calling. V2 of the model has a fixed chatml format, JSON function calling syntax, and support for more Home Assitant entity types.
15
+
16
+ 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.
17
+
18
+ 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.
19
+
20
+ Example "system" prompt:
21
+ ```
22
+ 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.
23
+ Services: light.turn_off, light.turn_on, fan.turn_on, fan.turn_off
24
+ Devices:
25
+ light.office 'Office Light' = on
26
+ fan.office 'Office fan' = off
27
+ light.kitchen 'Kitchen Light' = on
28
+ ```
29
+
30
+ 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:
31
+
32
+ `````
33
+ turning on the kitchen lights for you now
34
+ ```homeassistant
35
+ { "service": "light.turn_on", "target_device": "light.kitchen" }
36
+ ```
37
+ `````
38
+
39
+ 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:
40
+
41
+ ```
42
+ user if mary is 7 years old, and I am 3 years older than her. how old am I?
43
+ assistant If Mary is 7 years old, then you are 10 years old (7+3=10).
44
+ ```
45
+
46
+ ## Training
47
+ The model was trained as a LoRA on an RTX 3090 (24GB). The LoRA has rank = 32, alpha = 64, targets the `fc1,fc2,q_proj,v_proj,out_proj` modules and "saves" the `embed_tokens,lm_head` 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.
48
+
49
+ ## Datasets
50
+ Snythetic Dataset for SFT - https://github.com/acon96/home-llm
51
+ Stanford Alpaca Cleaned - https://huggingface.co/datasets/yahma/alpaca-cleaned
52
+
53
+ ## License
54
+ 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.