Text Generation
Transformers
GGUF
English
qwen
qwen3
lora
home-assistant
home-automation
smart-home
tool-use
conversational
Instructions to use selorahomes/Selora-AI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use selorahomes/Selora-AI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="selorahomes/Selora-AI") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("selorahomes/Selora-AI", dtype="auto") - llama-cpp-python
How to use selorahomes/Selora-AI with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="selorahomes/Selora-AI", filename="qwen3_17b_base.Q6_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use selorahomes/Selora-AI with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf selorahomes/Selora-AI:Q6_K # Run inference directly in the terminal: llama-cli -hf selorahomes/Selora-AI:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf selorahomes/Selora-AI:Q6_K # Run inference directly in the terminal: llama-cli -hf selorahomes/Selora-AI:Q6_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf selorahomes/Selora-AI:Q6_K # Run inference directly in the terminal: ./llama-cli -hf selorahomes/Selora-AI:Q6_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf selorahomes/Selora-AI:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf selorahomes/Selora-AI:Q6_K
Use Docker
docker model run hf.co/selorahomes/Selora-AI:Q6_K
- LM Studio
- Jan
- vLLM
How to use selorahomes/Selora-AI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "selorahomes/Selora-AI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "selorahomes/Selora-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/selorahomes/Selora-AI:Q6_K
- SGLang
How to use selorahomes/Selora-AI with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "selorahomes/Selora-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "selorahomes/Selora-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "selorahomes/Selora-AI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "selorahomes/Selora-AI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use selorahomes/Selora-AI with Ollama:
ollama run hf.co/selorahomes/Selora-AI:Q6_K
- Unsloth Studio
How to use selorahomes/Selora-AI with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for selorahomes/Selora-AI to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for selorahomes/Selora-AI to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for selorahomes/Selora-AI to start chatting
- Pi
How to use selorahomes/Selora-AI with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf selorahomes/Selora-AI:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "selorahomes/Selora-AI:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use selorahomes/Selora-AI with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf selorahomes/Selora-AI:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default selorahomes/Selora-AI:Q6_K
Run Hermes
hermes
- Docker Model Runner
How to use selorahomes/Selora-AI with Docker Model Runner:
docker model run hf.co/selorahomes/Selora-AI:Q6_K
- Lemonade
How to use selorahomes/Selora-AI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull selorahomes/Selora-AI:Q6_K
Run and chat with the model
lemonade run user.Selora-AI-Q6_K
List all available models
lemonade list
Publish selora-ai-local 0.4.2
Browse files- .gitattributes +4 -0
- Modelfile.answers +31 -11
- Modelfile.automations +6 -6
- Modelfile.clarifications +6 -6
- Modelfile.commands +6 -6
- README.md +28 -21
- manifest.json +28 -32
- prompts/answers.txt +23 -5
- qwen25_15b_base.Q4_K_M.gguf +0 -3
- qwen25_15b_clarification.lora.gguf +0 -3
- qwen3_17b_automation.lora.gguf +0 -3
- qwen3_17b_base.IQ4_XS.gguf +0 -3
- qwen3_17b_clarification.lora.gguf +0 -3
- qwen3_17b_command.lora.gguf +0 -3
- qwen25_15b_answer.lora.gguf β selora-v042-answer.f16.gguf +2 -2
- qwen25_15b_automation.lora.gguf β selora-v042-automation.f16.gguf +2 -2
- qwen3_17b_answer.lora.gguf β selora-v042-clarification.f16.gguf +1 -1
- qwen25_15b_command.lora.gguf β selora-v042-command.f16.gguf +2 -2
.gitattributes
CHANGED
|
@@ -44,3 +44,7 @@ qwen3_17b_base.IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
|
| 44 |
qwen3_17b_base.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
qwen3_17b_clarification.lora.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
qwen3_17b_command.lora.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
qwen3_17b_base.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
qwen3_17b_clarification.lora.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
qwen3_17b_command.lora.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
selora-v042-answer.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
selora-v042-automation.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
selora-v042-clarification.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
selora-v042-command.f16.gguf filter=lfs diff=lfs merge=lfs -text
|
Modelfile.answers
CHANGED
|
@@ -1,29 +1,49 @@
|
|
| 1 |
-
# Ollama Modelfile for SeloraAI-Local / answer specialist (
|
| 2 |
# Build: ollama create selora-qwen-answer -f Modelfile.answers
|
| 3 |
# Run: ollama run selora-qwen-answer
|
| 4 |
|
| 5 |
-
FROM ../
|
| 6 |
-
ADAPTER ../
|
| 7 |
|
| 8 |
-
#
|
|
|
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
-
{{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
-
# Trained per-specialist system prompt (matches
|
|
|
|
| 17 |
SYSTEM """You are Selora AI, a home automation assistant on Home Assistant. You CAN: control lights/climate/locks/switches, run scripts and scenes, set timers and reminders via timer/input_datetime entities, query device states, and create automations on request. Never say you are a "text-based AI" or that you cannot do something Home Assistant supports β describe how you would do it instead.
|
| 18 |
|
| 19 |
-
Return ONE JSON object:
|
|
|
|
|
|
|
| 20 |
{"intent":"answer","response":"<1-3 sentences>"}
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
RULES:
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
-
|
| 26 |
-
- If the user asks what you can do, list 2-4 concrete capabilities (control devices, set timers, build automations, summarize home state) β not generic phrases.
|
| 27 |
- Output ONLY the JSON object."""
|
| 28 |
|
| 29 |
# Generation params β matches what the integration sends + repeat_penalty for Qwen
|
|
|
|
| 1 |
+
# Ollama Modelfile for SeloraAI-Local / answer specialist (Qwen3 1.7B)
|
| 2 |
# Build: ollama create selora-qwen-answer -f Modelfile.answers
|
| 3 |
# Run: ollama run selora-qwen-answer
|
| 4 |
|
| 5 |
+
FROM ../qwen3_17b_base.IQ4_XS.gguf
|
| 6 |
+
ADAPTER ../qwen3_17b_answer.lora.gguf
|
| 7 |
|
| 8 |
+
# Qwen3 chat template (ChatML, /no_think to suppress reasoning blocks for
|
| 9 |
+
# short structured JSON output)
|
| 10 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 11 |
{{ .System }}<|im_end|>
|
| 12 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 13 |
+
/no_think {{ .Prompt }}<|im_end|>
|
| 14 |
{{ end }}<|im_start|>assistant
|
| 15 |
"""
|
| 16 |
|
| 17 |
+
# Trained per-specialist system prompt (matches current training data,
|
| 18 |
+
# includes the query_state tool envelope).
|
| 19 |
SYSTEM """You are Selora AI, a home automation assistant on Home Assistant. You CAN: control lights/climate/locks/switches, run scripts and scenes, set timers and reminders via timer/input_datetime entities, query device states, and create automations on request. Never say you are a "text-based AI" or that you cannot do something Home Assistant supports β describe how you would do it instead.
|
| 20 |
|
| 21 |
+
Return ONE JSON object using one of these envelope shapes:
|
| 22 |
+
|
| 23 |
+
ANSWER β for conversational questions, recommendations, or when AVAILABLE ENTITIES already has the full answer:
|
| 24 |
{"intent":"answer","response":"<1-3 sentences>"}
|
| 25 |
|
| 26 |
+
QUERY_STATE β for live state queries that need filtering by state/attribute:
|
| 27 |
+
{"intent":"query_state","calls":[{"tool":"query_state","args":{"domain":"<domain>","filter":{"state":"<value>"}}}]}
|
| 28 |
+
|
| 29 |
+
TOOL SCHEMA:
|
| 30 |
+
- tool: "query_state"
|
| 31 |
+
- args:
|
| 32 |
+
domain (str, required): HA domain β light/switch/lock/cover/fan/media_player/climate/binary_sensor/sensor/person/device_tracker
|
| 33 |
+
filter (dict, optional):
|
| 34 |
+
state (str): match exact state ("on", "off", "locked", "open", "home", ...)
|
| 35 |
+
entity_id (str): match a specific entity_id
|
| 36 |
+
device_class (str): match HA device_class ("door", "window", "motion", ...)
|
| 37 |
+
attribute (dict): match attribute key/value (e.g. {"hvac_mode": "heat"})
|
| 38 |
+
|
| 39 |
+
WHEN TO USE EACH:
|
| 40 |
+
- query_state for "what's on?", "is X locked?", "how many windows are open?", "which thermostats are heating?".
|
| 41 |
+
- answer for "what can you do?", "explain X", or when the catalog already gives a complete 1-3 sentence answer ("am I home?" β check person entity).
|
| 42 |
+
|
| 43 |
RULES:
|
| 44 |
+
- 1-3 sentences for answer. Add detail only if the user asked for it.
|
| 45 |
+
- Ground answer responses in AVAILABLE ENTITIES β name actual friendly_names and current state values.
|
| 46 |
+
- When naming a specific device in an answer, wrap its friendly_name in entity markers like [[entity:light.kitchen|Kitchen Lights]] so the panel renders it as a live tile.
|
|
|
|
| 47 |
- Output ONLY the JSON object."""
|
| 48 |
|
| 49 |
# Generation params β matches what the integration sends + repeat_penalty for Qwen
|
Modelfile.automations
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
# Ollama Modelfile for SeloraAI-Local / automation specialist (
|
| 2 |
# Build: ollama create selora-qwen-automation -f Modelfile.automations
|
| 3 |
# Run: ollama run selora-qwen-automation
|
| 4 |
|
| 5 |
-
FROM ../
|
| 6 |
-
ADAPTER ../
|
| 7 |
|
| 8 |
-
#
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
-
{{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
-
# Trained per-specialist system prompt (matches
|
| 17 |
SYSTEM """You are Selora AI, an automation architect for Home Assistant. The user wants a recurring rule, schedule, or multi-step sequence saved as an automation.
|
| 18 |
|
| 19 |
Return ONE JSON object with this shape and nothing else:
|
|
|
|
| 1 |
+
# Ollama Modelfile for SeloraAI-Local / automation specialist (Qwen3 1.7B)
|
| 2 |
# Build: ollama create selora-qwen-automation -f Modelfile.automations
|
| 3 |
# Run: ollama run selora-qwen-automation
|
| 4 |
|
| 5 |
+
FROM ../qwen3_17b_base.IQ4_XS.gguf
|
| 6 |
+
ADAPTER ../qwen3_17b_automation.lora.gguf
|
| 7 |
|
| 8 |
+
# Qwen3 chat template (ChatML, /no_think to suppress reasoning)
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
+
/no_think {{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
+
# Trained per-specialist system prompt (matches current training data)
|
| 17 |
SYSTEM """You are Selora AI, an automation architect for Home Assistant. The user wants a recurring rule, schedule, or multi-step sequence saved as an automation.
|
| 18 |
|
| 19 |
Return ONE JSON object with this shape and nothing else:
|
Modelfile.clarifications
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
# Ollama Modelfile for SeloraAI-Local / clarification specialist (
|
| 2 |
# Build: ollama create selora-qwen-clarification -f Modelfile.clarifications
|
| 3 |
# Run: ollama run selora-qwen-clarification
|
| 4 |
|
| 5 |
-
FROM ../
|
| 6 |
-
ADAPTER ../
|
| 7 |
|
| 8 |
-
#
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
-
{{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
-
# Trained per-specialist system prompt (matches
|
| 17 |
SYSTEM """You are Selora AI on Home Assistant. The user's request is ambiguous and you need ONE focused follow-up question to disambiguate.
|
| 18 |
|
| 19 |
Return ONE JSON object:
|
|
|
|
| 1 |
+
# Ollama Modelfile for SeloraAI-Local / clarification specialist (Qwen3 1.7B)
|
| 2 |
# Build: ollama create selora-qwen-clarification -f Modelfile.clarifications
|
| 3 |
# Run: ollama run selora-qwen-clarification
|
| 4 |
|
| 5 |
+
FROM ../qwen3_17b_base.IQ4_XS.gguf
|
| 6 |
+
ADAPTER ../qwen3_17b_clarification.lora.gguf
|
| 7 |
|
| 8 |
+
# Qwen3 chat template (ChatML, /no_think to suppress reasoning)
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
+
/no_think {{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
+
# Trained per-specialist system prompt (matches current training data)
|
| 17 |
SYSTEM """You are Selora AI on Home Assistant. The user's request is ambiguous and you need ONE focused follow-up question to disambiguate.
|
| 18 |
|
| 19 |
Return ONE JSON object:
|
Modelfile.commands
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
# Ollama Modelfile for SeloraAI-Local / command specialist (
|
| 2 |
# Build: ollama create selora-qwen-command -f Modelfile.commands
|
| 3 |
# Run: ollama run selora-qwen-command
|
| 4 |
|
| 5 |
-
FROM ../
|
| 6 |
-
ADAPTER ../
|
| 7 |
|
| 8 |
-
#
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
-
{{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
-
# Trained per-specialist system prompt (matches
|
| 17 |
SYSTEM """You are Selora AI, controlling devices on a Home Assistant instance. The user wants an immediate action.
|
| 18 |
|
| 19 |
Return ONE JSON object with this shape and nothing else:
|
|
|
|
| 1 |
+
# Ollama Modelfile for SeloraAI-Local / command specialist (Qwen3 1.7B)
|
| 2 |
# Build: ollama create selora-qwen-command -f Modelfile.commands
|
| 3 |
# Run: ollama run selora-qwen-command
|
| 4 |
|
| 5 |
+
FROM ../qwen3_17b_base.IQ4_XS.gguf
|
| 6 |
+
ADAPTER ../qwen3_17b_command.lora.gguf
|
| 7 |
|
| 8 |
+
# Qwen3 chat template (ChatML, /no_think to suppress reasoning)
|
| 9 |
TEMPLATE """{{ if .System }}<|im_start|>system
|
| 10 |
{{ .System }}<|im_end|>
|
| 11 |
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 12 |
+
/no_think {{ .Prompt }}<|im_end|>
|
| 13 |
{{ end }}<|im_start|>assistant
|
| 14 |
"""
|
| 15 |
|
| 16 |
+
# Trained per-specialist system prompt (matches current training data)
|
| 17 |
SYSTEM """You are Selora AI, controlling devices on a Home Assistant instance. The user wants an immediate action.
|
| 18 |
|
| 19 |
Return ONE JSON object with this shape and nothing else:
|
README.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model: Qwen/
|
| 4 |
tags:
|
| 5 |
- text-generation
|
| 6 |
- qwen
|
| 7 |
-
-
|
| 8 |
- lora
|
| 9 |
- home-assistant
|
| 10 |
- home-automation
|
| 11 |
- smart-home
|
|
|
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
library_name: transformers
|
|
@@ -17,8 +18,10 @@ pipeline_tag: text-generation
|
|
| 17 |
|
| 18 |
# Selora AI
|
| 19 |
|
| 20 |
-
|
| 21 |
-
adapters.
|
|
|
|
|
|
|
| 22 |
integration](https://gitlab.com/selorahomes/products/selora-ai/ha-integration);
|
| 23 |
also runnable directly via Ollama, llama.cpp, or vLLM.
|
| 24 |
|
|
@@ -54,12 +57,12 @@ are also published as separate Ollama models.
|
|
| 54 |
|
| 55 |
```bash
|
| 56 |
llama-server \
|
| 57 |
-
--model
|
| 58 |
--lora-init-without-apply \
|
| 59 |
-
--lora
|
| 60 |
-
--lora
|
| 61 |
-
--lora
|
| 62 |
-
--lora
|
| 63 |
--ctx-size 8192
|
| 64 |
```
|
| 65 |
|
|
@@ -70,7 +73,7 @@ POST to `/lora-adapters` to switch the active LoRA before each
|
|
| 70 |
|
| 71 |
```bash
|
| 72 |
python -m vllm.entrypoints.openai.api_server \
|
| 73 |
-
--model ./
|
| 74 |
--enable-lora --max-loras 4 --max-lora-rank 32 \
|
| 75 |
--lora-modules \
|
| 76 |
selora-v1-commands=/path/to/peft/command \
|
|
@@ -98,12 +101,16 @@ Bump `max_tokens` to 1536 for automation requests (longer JSON output).
|
|
| 98 |
|
| 99 |
## Training
|
| 100 |
|
| 101 |
-
Base: [
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
HA-domain corpus (forum threads, HA docs, synthetic command/
|
| 105 |
-
pairs). System prompts trained per-specialist; see
|
| 106 |
-
[`prompts/`](prompts/).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
## Evaluation
|
| 109 |
|
|
@@ -115,8 +122,8 @@ scenarios live in [`parity/`](parity/).
|
|
| 115 |
|
| 116 |
| Artifact | Purpose | Distribution |
|
| 117 |
| --- | --- | --- |
|
| 118 |
-
| `
|
| 119 |
-
| `
|
| 120 |
| `Modelfile.{intent}` (Γ4) | Ollama recipes (base + LoRA + system prompt) | this repo, ollama.com |
|
| 121 |
| `prompts/{intent}.txt` (Γ4) | Plain-text trained prompts (reference / testing) | this repo |
|
| 122 |
|
|
@@ -128,15 +135,15 @@ mirrored to Hugging Face.
|
|
| 128 |
|
| 129 |
```bibtex
|
| 130 |
@misc{selora-ai-2026,
|
| 131 |
-
title = {Selora AI:
|
| 132 |
author = {{Selora Homes}},
|
| 133 |
year = {2026},
|
| 134 |
url = {https://huggingface.co/selora-homes/selora-ai}
|
| 135 |
}
|
| 136 |
```
|
| 137 |
|
| 138 |
-
Base model citation: Qwen Team, *
|
| 139 |
|
| 140 |
## License
|
| 141 |
|
| 142 |
-
Apache-2.0 (matches the
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3-1.7B
|
| 4 |
tags:
|
| 5 |
- text-generation
|
| 6 |
- qwen
|
| 7 |
+
- qwen3
|
| 8 |
- lora
|
| 9 |
- home-assistant
|
| 10 |
- home-automation
|
| 11 |
- smart-home
|
| 12 |
+
- tool-use
|
| 13 |
language:
|
| 14 |
- en
|
| 15 |
library_name: transformers
|
|
|
|
| 18 |
|
| 19 |
# Selora AI
|
| 20 |
|
| 21 |
+
Qwen3 1.7B fine-tuned for Home Assistant with four specialist LoRA
|
| 22 |
+
adapters. The `answer` adapter additionally emits a `query_state` tool
|
| 23 |
+
envelope for live device-state queries against the Home Assistant REST
|
| 24 |
+
API. Used by the [Selora AI Home Assistant
|
| 25 |
integration](https://gitlab.com/selorahomes/products/selora-ai/ha-integration);
|
| 26 |
also runnable directly via Ollama, llama.cpp, or vLLM.
|
| 27 |
|
|
|
|
| 57 |
|
| 58 |
```bash
|
| 59 |
llama-server \
|
| 60 |
+
--model qwen3_17b_base.Q4_K_M.gguf \
|
| 61 |
--lora-init-without-apply \
|
| 62 |
+
--lora qwen3_17b_command.lora.gguf \
|
| 63 |
+
--lora qwen3_17b_automation.lora.gguf \
|
| 64 |
+
--lora qwen3_17b_answer.lora.gguf \
|
| 65 |
+
--lora qwen3_17b_clarification.lora.gguf \
|
| 66 |
--ctx-size 8192
|
| 67 |
```
|
| 68 |
|
|
|
|
| 73 |
|
| 74 |
```bash
|
| 75 |
python -m vllm.entrypoints.openai.api_server \
|
| 76 |
+
--model ./qwen3_17b_hf \
|
| 77 |
--enable-lora --max-loras 4 --max-lora-rank 32 \
|
| 78 |
--lora-modules \
|
| 79 |
selora-v1-commands=/path/to/peft/command \
|
|
|
|
| 101 |
|
| 102 |
## Training
|
| 103 |
|
| 104 |
+
Base: [Qwen3 1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) fine-tuned
|
| 105 |
+
with [Apple mlx-lm](https://github.com/ml-explore/mlx-examples). Each
|
| 106 |
+
specialist has its own LoRA (rank 8β28, scale 20) trained on a curated
|
| 107 |
+
HA-domain corpus (forum threads, HA docs, synthetic command /
|
| 108 |
+
automation pairs). System prompts trained per-specialist; see
|
| 109 |
+
[`prompts/`](prompts/). The `answer` adapter went through a sequential
|
| 110 |
+
continuation pass that added a `query_state` tool envelope on top of
|
| 111 |
+
the original answer-only training distribution; that's preserved in
|
| 112 |
+
the augmented `prompts/answers.txt` and the `Modelfile.answers` SYSTEM
|
| 113 |
+
block.
|
| 114 |
|
| 115 |
## Evaluation
|
| 116 |
|
|
|
|
| 122 |
|
| 123 |
| Artifact | Purpose | Distribution |
|
| 124 |
| --- | --- | --- |
|
| 125 |
+
| `qwen3_17b_base.IQ4_XS.gguf` | Quantized base for Ollama / llama.cpp | Hugging Face, ollama.com |
|
| 126 |
+
| `qwen3_17b_{intent}.lora.gguf` (Γ4) | Specialist LoRA adapters | Hugging Face, ollama.com |
|
| 127 |
| `Modelfile.{intent}` (Γ4) | Ollama recipes (base + LoRA + system prompt) | this repo, ollama.com |
|
| 128 |
| `prompts/{intent}.txt` (Γ4) | Plain-text trained prompts (reference / testing) | this repo |
|
| 129 |
|
|
|
|
| 135 |
|
| 136 |
```bibtex
|
| 137 |
@misc{selora-ai-2026,
|
| 138 |
+
title = {Selora AI: Qwen3 1.7B + LoRA Specialists for Home Assistant},
|
| 139 |
author = {{Selora Homes}},
|
| 140 |
year = {2026},
|
| 141 |
url = {https://huggingface.co/selora-homes/selora-ai}
|
| 142 |
}
|
| 143 |
```
|
| 144 |
|
| 145 |
+
Base model citation: Qwen Team, *Qwen3 Technical Report* (2025).
|
| 146 |
|
| 147 |
## License
|
| 148 |
|
| 149 |
+
Apache-2.0 (matches the Qwen3 base license).
|
manifest.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
| 1 |
{
|
| 2 |
"artifacts": {
|
| 3 |
"Modelfile.answers": {
|
| 4 |
-
"sha256": "
|
| 5 |
-
"size":
|
| 6 |
},
|
| 7 |
"Modelfile.automations": {
|
| 8 |
-
"sha256": "
|
| 9 |
-
"size":
|
| 10 |
},
|
| 11 |
"Modelfile.clarifications": {
|
| 12 |
-
"sha256": "
|
| 13 |
-
"size":
|
| 14 |
},
|
| 15 |
"Modelfile.commands": {
|
| 16 |
-
"sha256": "
|
| 17 |
-
"size":
|
| 18 |
},
|
| 19 |
"README.md": {
|
| 20 |
-
"sha256": "
|
| 21 |
-
"size":
|
| 22 |
},
|
| 23 |
"prompts/answers.txt": {
|
| 24 |
-
"sha256": "
|
| 25 |
-
"size":
|
| 26 |
},
|
| 27 |
"prompts/automations.txt": {
|
| 28 |
"sha256": "91a2e51752acb7b477b5b296710cff1de226deabbe49622c2be374e201422562",
|
|
@@ -36,32 +36,28 @@
|
|
| 36 |
"sha256": "b8aea3ac5448921e333285862846b2b47ed70ee95e0fa9527832ff139fc094b5",
|
| 37 |
"size": 676
|
| 38 |
},
|
| 39 |
-
"qwen3_17b_answer.lora.gguf": {
|
| 40 |
-
"sha256": "78326df5b6f5e87dba23213757eb9831e1e7ba8c3c9675ad17fe1b862ce543e8",
|
| 41 |
-
"size": 9977056
|
| 42 |
-
},
|
| 43 |
-
"qwen3_17b_automation.lora.gguf": {
|
| 44 |
-
"sha256": "35ebf02a91efebee22ed39527779b3ff737172317af939f51ad6fe4a536867a7",
|
| 45 |
-
"size": 17459488
|
| 46 |
-
},
|
| 47 |
-
"qwen3_17b_base.IQ4_XS.gguf": {
|
| 48 |
-
"sha256": "db25eadd961385299483baec0db07fd29d5963d1faf025a7a9468f60789df292",
|
| 49 |
-
"size": 1181587232
|
| 50 |
-
},
|
| 51 |
"qwen3_17b_base.f16.gguf": {
|
| 52 |
"sha256": "3e4009f0d96955a45f29aa77bded839d376d7832823c6909f76c84ace81dc445",
|
| 53 |
"size": 4069678880
|
| 54 |
},
|
| 55 |
-
"
|
| 56 |
-
"sha256": "
|
| 57 |
-
"size":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
},
|
| 59 |
-
"
|
| 60 |
-
"sha256": "
|
| 61 |
"size": 9977056
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
},
|
| 64 |
-
"base_model": "Qwen/
|
| 65 |
-
"released_at": "2026-05-
|
| 66 |
-
"version": "0.4.
|
| 67 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"artifacts": {
|
| 3 |
"Modelfile.answers": {
|
| 4 |
+
"sha256": "fd6351414258a679a3b285f1a4882ef6f93b2355d555aaf153c776a3720ba758",
|
| 5 |
+
"size": 2871
|
| 6 |
},
|
| 7 |
"Modelfile.automations": {
|
| 8 |
+
"sha256": "0112f8d5e2bd2dbc839a90a0b9edd1b039af478cc2dbd589160d3b2fdc0f06a5",
|
| 9 |
+
"size": 1800
|
| 10 |
},
|
| 11 |
"Modelfile.clarifications": {
|
| 12 |
+
"sha256": "7fc51ef60f143b8341b3ad53c942b98df555059a0029c117f428861370111f09",
|
| 13 |
+
"size": 1303
|
| 14 |
},
|
| 15 |
"Modelfile.commands": {
|
| 16 |
+
"sha256": "2d46b2ce315d1fc30ac791f71c24f644cd4b13bf7caa8f0d088290ccddeccdde",
|
| 17 |
+
"size": 1491
|
| 18 |
},
|
| 19 |
"README.md": {
|
| 20 |
+
"sha256": "d65dca8d4af1936d1c4f22423417345bfc61a1c550f7bbd6d95a1f86a21ee2f3",
|
| 21 |
+
"size": 4558
|
| 22 |
},
|
| 23 |
"prompts/answers.txt": {
|
| 24 |
+
"sha256": "71d8badea043b2d7c3bb076040a1f0f4c66511ab2785e1e04fa392e3d82c22d2",
|
| 25 |
+
"size": 1976
|
| 26 |
},
|
| 27 |
"prompts/automations.txt": {
|
| 28 |
"sha256": "91a2e51752acb7b477b5b296710cff1de226deabbe49622c2be374e201422562",
|
|
|
|
| 36 |
"sha256": "b8aea3ac5448921e333285862846b2b47ed70ee95e0fa9527832ff139fc094b5",
|
| 37 |
"size": 676
|
| 38 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
"qwen3_17b_base.f16.gguf": {
|
| 40 |
"sha256": "3e4009f0d96955a45f29aa77bded839d376d7832823c6909f76c84ace81dc445",
|
| 41 |
"size": 4069678880
|
| 42 |
},
|
| 43 |
+
"selora-v042-answer.f16.gguf": {
|
| 44 |
+
"sha256": "7d5a7dea12fac72aebc1fb361d18e97e46172a8c2f5cf0c7968322167ef272f9",
|
| 45 |
+
"size": 14957792
|
| 46 |
+
},
|
| 47 |
+
"selora-v042-automation.f16.gguf": {
|
| 48 |
+
"sha256": "6ceb555a2a809b54294bf311474286612b18a1870789575f3ed9d49396adff3d",
|
| 49 |
+
"size": 37374880
|
| 50 |
},
|
| 51 |
+
"selora-v042-clarification.f16.gguf": {
|
| 52 |
+
"sha256": "69d547c8175412a9dc52fdce22dc45cc3cb448e4eb05f11d73e9a27c8939bbe0",
|
| 53 |
"size": 9977056
|
| 54 |
+
},
|
| 55 |
+
"selora-v042-command.f16.gguf": {
|
| 56 |
+
"sha256": "7555c5ee00ed46a1eef829d8e82d22ecc251502650c9e866e78c5d0b65e2e1d4",
|
| 57 |
+
"size": 19938528
|
| 58 |
}
|
| 59 |
},
|
| 60 |
+
"base_model": "Qwen/Qwen3-1.7B",
|
| 61 |
+
"released_at": "2026-05-14T15:16:49Z",
|
| 62 |
+
"version": "0.4.2"
|
| 63 |
}
|
prompts/answers.txt
CHANGED
|
@@ -1,11 +1,29 @@
|
|
| 1 |
You are Selora AI, a home automation assistant on Home Assistant. You CAN: control lights/climate/locks/switches, run scripts and scenes, set timers and reminders via timer/input_datetime entities, query device states, and create automations on request. Never say you are a "text-based AI" or that you cannot do something Home Assistant supports β describe how you would do it instead.
|
| 2 |
|
| 3 |
-
Return ONE JSON object:
|
|
|
|
|
|
|
| 4 |
{"intent":"answer","response":"<1-3 sentences>"}
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
RULES:
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
- If the user asks what you can do, list 2-4 concrete capabilities (control devices, set timers, build automations, summarize home state) β not generic phrases.
|
| 11 |
- Output ONLY the JSON object.
|
|
|
|
| 1 |
You are Selora AI, a home automation assistant on Home Assistant. You CAN: control lights/climate/locks/switches, run scripts and scenes, set timers and reminders via timer/input_datetime entities, query device states, and create automations on request. Never say you are a "text-based AI" or that you cannot do something Home Assistant supports β describe how you would do it instead.
|
| 2 |
|
| 3 |
+
Return ONE JSON object using one of these envelope shapes:
|
| 4 |
+
|
| 5 |
+
ANSWER β for conversational questions, recommendations, or when AVAILABLE ENTITIES already has the full answer:
|
| 6 |
{"intent":"answer","response":"<1-3 sentences>"}
|
| 7 |
|
| 8 |
+
QUERY_STATE β for live state queries that need filtering by state/attribute:
|
| 9 |
+
{"intent":"query_state","calls":[{"tool":"query_state","args":{"domain":"<domain>","filter":{"state":"<value>"}}}]}
|
| 10 |
+
|
| 11 |
+
TOOL SCHEMA:
|
| 12 |
+
- tool: "query_state"
|
| 13 |
+
- args:
|
| 14 |
+
domain (str, required): HA domain β light/switch/lock/cover/fan/media_player/climate/binary_sensor/sensor/person/device_tracker
|
| 15 |
+
filter (dict, optional):
|
| 16 |
+
state (str): match exact state ("on", "off", "locked", "open", "home", ...)
|
| 17 |
+
entity_id (str): match a specific entity_id
|
| 18 |
+
device_class (str): match HA device_class ("door", "window", "motion", ...)
|
| 19 |
+
attribute (dict): match attribute key/value (e.g. {"hvac_mode": "heat"})
|
| 20 |
+
|
| 21 |
+
WHEN TO USE EACH:
|
| 22 |
+
- query_state for "what's on?", "is X locked?", "how many windows are open?", "which thermostats are heating?".
|
| 23 |
+
- answer for "what can you do?", "explain X", or when the catalog already gives a complete 1-3 sentence answer ("am I home?" β check person entity).
|
| 24 |
+
|
| 25 |
RULES:
|
| 26 |
+
- 1-3 sentences for answer. Add detail only if the user asked for it.
|
| 27 |
+
- Ground answer responses in AVAILABLE ENTITIES β name actual friendly_names and current state values.
|
| 28 |
+
- When naming a specific device in an answer, wrap its friendly_name in entity markers like [[entity:light.kitchen|Kitchen Lights]] so the panel renders it as a live tile.
|
|
|
|
| 29 |
- Output ONLY the JSON object.
|
qwen25_15b_base.Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:676f7cda1b9382c83d29c763e947416fe5db1abb4bc25fa7db5aa293164bf5ad
|
| 3 |
-
size 986048000
|
|
|
|
|
|
|
|
|
|
|
|
qwen25_15b_clarification.lora.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bb3980d049889f29aec831c4aab688983b374868bd218e0f9431d2dce4450e34
|
| 3 |
-
size 10566880
|
|
|
|
|
|
|
|
|
|
|
|
qwen3_17b_automation.lora.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:35ebf02a91efebee22ed39527779b3ff737172317af939f51ad6fe4a536867a7
|
| 3 |
-
size 17459488
|
|
|
|
|
|
|
|
|
|
|
|
qwen3_17b_base.IQ4_XS.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:db25eadd961385299483baec0db07fd29d5963d1faf025a7a9468f60789df292
|
| 3 |
-
size 1181587232
|
|
|
|
|
|
|
|
|
|
|
|
qwen3_17b_clarification.lora.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:88efbca12c75c8a6c92b4843455186e8723e19a904af2b701c496846370e9a01
|
| 3 |
-
size 4988672
|
|
|
|
|
|
|
|
|
|
|
|
qwen3_17b_command.lora.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:df7b60e7c70e4650e4d353d76c875dc74471cc8445bb395af662fad654a5765a
|
| 3 |
-
size 9977056
|
|
|
|
|
|
|
|
|
|
|
|
qwen25_15b_answer.lora.gguf β selora-v042-answer.f16.gguf
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d5a7dea12fac72aebc1fb361d18e97e46172a8c2f5cf0c7968322167ef272f9
|
| 3 |
+
size 14957792
|
qwen25_15b_automation.lora.gguf β selora-v042-automation.f16.gguf
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ceb555a2a809b54294bf311474286612b18a1870789575f3ed9d49396adff3d
|
| 3 |
+
size 37374880
|
qwen3_17b_answer.lora.gguf β selora-v042-clarification.f16.gguf
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9977056
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69d547c8175412a9dc52fdce22dc45cc3cb448e4eb05f11d73e9a27c8939bbe0
|
| 3 |
size 9977056
|
qwen25_15b_command.lora.gguf β selora-v042-command.f16.gguf
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7555c5ee00ed46a1eef829d8e82d22ecc251502650c9e866e78c5d0b65e2e1d4
|
| 3 |
+
size 19938528
|