初始化项目,由ModelHub XC社区提供模型

Model: acon96/Home-1B-v3-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-21 02:03:10 +08:00
commit 73a8a71944
22 changed files with 93651 additions and 0 deletions

47
.gitattributes vendored Normal file
View File

@@ -0,0 +1,47 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.f16.gguf filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.q2_k.gguf filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
Home-1B-v3.q8_0.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.f16.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.q8_0.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
no_tools/Home-1B-v3.q2_k.gguf filter=lfs diff=lfs merge=lfs -text

3
Home-1B-v3.f16.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d706ffaad9c43a9f7dfe1211ddf1e58402f0c2c8922b76d2e0cc6836f100ae1
size 2201017824

3
Home-1B-v3.q2_k.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee597b437fa7f561eaf1d7ad1d216514d58d6f76ca7e6be173b0d8339e893b7e
size 432131616

3
Home-1B-v3.q3_k_m.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:641660bd236b662f021bf0f3f778b243189506a27ae38545d8dd269775fcbf4d
size 548404768

3
Home-1B-v3.q4_k_m.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8635ef0ae6d3465dfd7badca711281e2a947f15c6998ec4d222517bfb35b693
size 667815456

3
Home-1B-v3.q5_k_m.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:998dca1b68be663ea19947f36b5af216300d3b157bc79146b007d846f9ed37c4
size 782044704

3
Home-1B-v3.q8_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e676be6c0a2d762bbb2c50a3339e1f797207ae4dcd361f7ba307999963bd584
size 1169808928

53
README.md Normal file
View File

@@ -0,0 +1,53 @@
---
datasets:
- acon96/Home-Assistant-Requests
license: apache-2.0
language:
- en
tags:
- automation
- home
- assistant
pipeline_tag: text-generation
---
# Home 1B v3
The "Home" model is a fine tuning of the [TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) model. The model is able to control devices in the user's house via a Home Assistant integragion. The fine tuning dataset a [custom curated dataset](https://github.com/acon96/home-llm) 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 Zephyr 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 or answer the following question with the information provided only.
The current time and date is 08:12 AM on Thursday March 14, 2024
Services: light.turn_off(), light.turn_on(rgb_color,brightness), fan.turn_on(), fan.turn_off()
Devices:
light.office 'Office Light' = on;80%
fan.office 'Office fan' = off
light.kitchen 'Kitchen Light' = on;80%;red
light.bedroom 'Bedroom Light' = off
```
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
{ "service": "light.turn_on", "target_device": "light.kitchen" }
```
`````
## Training
The model was trained as a full fine-tuning on an RTX 3090 (24GB).
## Evaluation
This model acheives a 98.16% score for JSON function calling accuracy on the test dataset.
The v2 model acheives a 88.52% score on the same test.
The v1 model acheives a 76.78% score on the same test.
## Datasets
Snythetic Dataset for SFT - https://github.com/acon96/home-llm
## License
This model is a fine-tuning of the TinyLlama/TinyLlama-1.1B-Chat-v1.0 which is licensed under the Apache 2.0 License. As such this model is released under the same Apache 2.0 License.

28
config.json Normal file
View File

@@ -0,0 +1,28 @@
{
"_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"architectures": [
"LlamaForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 1,
"eos_token_id": 2,
"hidden_act": "silu",
"hidden_size": 2048,
"initializer_range": 0.02,
"intermediate_size": 5632,
"max_position_embeddings": 2048,
"model_type": "llama",
"num_attention_heads": 32,
"num_hidden_layers": 22,
"num_key_value_heads": 4,
"pretraining_tp": 1,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 10000.0,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.38.0",
"use_cache": false,
"vocab_size": 32000
}

7
generation_config.json Normal file
View File

@@ -0,0 +1,7 @@
{
"bos_token_id": 1,
"eos_token_id": 2,
"max_length": 2048,
"pad_token_id": 0,
"transformers_version": "4.38.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e6f7d68d7a9757c936c869c5c47d441bdddfa72f0a94cdb7b959df308d40ae3
size 2200119864

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7809ffa261ebf86935fdb7624b5447687dbb072ff79deec2684534ff71364d8f
size 2201017344

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:abb777896205b01ac0dfaaef0c7960765fed633c5bdba7c14dbc1c8c36fa7d44
size 432131104

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcae7ed653b9b023c3d38b38ae04e01d77a2d48922c06fbee26d7d82edcbb194
size 548404256

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9dbd47c978d43f0876a619035886546ebf808a816b701b2b40c0c72786a00d7
size 667814944

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb8bbbf40a7ad5ccb4be7a47b3642657b2e2a0c5130615ac4330342944f4aa24
size 782044192

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9ba60a57ed1a9f543acd1ad6bea7ae4cdfa7e5e44b22d0a7a8b4a84dc0f10ed5
size 1169808416

30
special_tokens_map.json Normal file
View File

@@ -0,0 +1,30 @@
{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"pad_token": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

11
template Normal file
View File

@@ -0,0 +1,11 @@
{{- range .Messages }}<|{{ .Role }}|>
{{ .Content }}
{{- if eq .Role "system" }}
Services:
{{- range $.Tools }} {{ .Function.Name }}({{- range $key, $value := .Function.Parameters.Properties }}{{- if ne $key "target_device" }}{{ $key }},{{- end }}{{- end }}),{{- end }}
{{- else if eq .Role "assistant" }}
{{ if .ToolCalls }}```homeassistant
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}```{{ end }}
{{- end }}<|endoftext|>
{{ end }}<|assistant|>

93391
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

BIN
tokenizer.model (Stored with Git LFS) Normal file

Binary file not shown.

42
tokenizer_config.json Normal file
View File

@@ -0,0 +1,42 @@
{
"add_bos_token": true,
"add_eos_token": false,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "<|endoftext|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"bos_token": "<s>",
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
"clean_up_tokenization_spaces": false,
"eos_token": "<|endoftext|>",
"legacy": false,
"model_max_length": 2048,
"pad_token": "<|endoftext|>",
"padding_side": "right",
"sp_model_kwargs": {},
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}