Instructions to use devshub-ai/knack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use devshub-ai/knack with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf devshub-ai/knack:Q4_K_M # Run inference directly in the terminal: llama cli -hf devshub-ai/knack:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devshub-ai/knack:Q4_K_M # Run inference directly in the terminal: llama cli -hf devshub-ai/knack:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf devshub-ai/knack:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf devshub-ai/knack:Q4_K_M
Use Docker
docker model run hf.co/devshub-ai/knack:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use devshub-ai/knack with Ollama:
ollama run hf.co/devshub-ai/knack:Q4_K_M
- Unsloth Desktop
- Pi
How to use devshub-ai/knack with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devshub-ai/knack:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "devshub-ai/knack:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devshub-ai/knack with Docker Model Runner:
docker model run hf.co/devshub-ai/knack:Q4_K_M
- Lemonade
How to use devshub-ai/knack with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devshub-ai/knack:Q4_K_M
Run and chat with the model
lemonade run user.knack-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use devshub-ai/knack with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devshub-ai/knack:Q4_K_M
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 devshub-ai/knack:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devshub-ai/knack with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devshub-ai/knack:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "devshub-ai/knack:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Docs: install separated from usage, 20+ real examples
Browse files
README.md
CHANGED
|
@@ -50,37 +50,125 @@ it is small, private, and answers all 8 command questions in about 17 ms.
|
|
| 50 |
| Size | 27B | 0.75B |
|
| 51 |
| A question it was not trained on | answers it | rejects it |
|
| 52 |
|
| 53 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
```
|
| 56 |
-
echo "
|
|
|
|
|
|
|
|
|
|
| 57 |
```
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
yes 97%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
```
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
```
|
| 74 |
-
echo "
|
| 75 |
-
|
| 76 |
-
echo "fix the failing login test" | ollama run devshub/knack --ask task.intent \
|
| 77 |
-
--choice bug_fix --choice feature --choice refactor --choice api_schema --choice config_deploy \
|
| 78 |
-
--choice test --choice documentation --choice investigation --choice unknown
|
| 79 |
```
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
|
| 85 |
## API
|
| 86 |
|
|
@@ -197,7 +285,8 @@ defaults).
|
|
| 197 |
refund requested?", is rejected. Use a general decision model like clef for those.
|
| 198 |
- **Other input.** Logs, emails, tickets, documents or images give meaningless answers,
|
| 199 |
even to these 29 questions.
|
| 200 |
-
- **Conversation history.** Through Ollama it sees a single message
|
|
|
|
| 201 |
gets the session context, which makes the turn questions more reliable.
|
| 202 |
- **Text generation.** It returns one pick with a confidence, never sentences.
|
| 203 |
|
|
@@ -210,10 +299,11 @@ Measured with the commands above, so you know where to double-check:
|
|
| 210 |
| `tail -f app.log` | `serves` | no, 75% | yes |
|
| 211 |
| `npm run build` | `serves` | yes, 79% | no |
|
| 212 |
| `docker compose up` | `long_running` | 51% yes | yes |
|
|
|
|
| 213 |
| `npm test` | `long_running` | 45% yes | unclear, depends on the suite |
|
| 214 |
|
| 215 |
-
These come from the model, not the Ollama packaging
|
| 216 |
-
|
| 217 |
|
| 218 |
## Results
|
| 219 |
|
|
|
|
| 50 |
| Size | 27B | 0.75B |
|
| 51 |
| A question it was not trained on | answers it | rejects it |
|
| 52 |
|
| 53 |
+
## Ask it a question
|
| 54 |
+
|
| 55 |
+
Every call has the same three parts: **the text to judge**, **the question id**, and
|
| 56 |
+
**Knack's answer**. `echo` only hands the text to Knack. Nothing in the text is ever run,
|
| 57 |
+
so you can safely ask about dangerous commands.
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
echo "<text to judge>" | ollama run devshub/knack --ask <question id>
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
For example, "will `npm run dev` keep running until I stop it?":
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
$ echo "npm run dev" | ollama run devshub/knack --ask serves
|
| 67 |
+
yes 97%
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Questions about a shell command
|
| 71 |
+
|
| 72 |
+
Will it keep running until stopped?
|
| 73 |
+
|
| 74 |
+
```
|
| 75 |
+
$ echo "python -m http.server 8000" | ollama run devshub/knack --ask serves
|
| 76 |
+
yes 98%
|
| 77 |
+
$ echo "pytest -q" | ollama run devshub/knack --ask serves
|
| 78 |
+
no 97%
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
How dangerous is it?
|
| 82 |
+
|
| 83 |
+
```
|
| 84 |
+
$ echo "ls -la" | ollama run devshub/knack --ask risk --level safe --level "needs care" --level destructive
|
| 85 |
+
safe 97% 0.0 / 2
|
| 86 |
+
$ echo "npm install" | ollama run devshub/knack --ask risk --level safe --level "needs care" --level destructive
|
| 87 |
+
needs care 96% 1.0 / 2
|
| 88 |
+
$ echo "git push --force origin main" | ollama run devshub/knack --ask risk --level safe --level "needs care" --level destructive
|
| 89 |
+
destructive 96% 1.9 / 2
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
Will it take minutes?
|
| 93 |
|
| 94 |
```
|
| 95 |
+
$ echo "cargo build --release" | ollama run devshub/knack --ask long_running
|
| 96 |
+
yes 84%
|
| 97 |
+
$ echo "git status" | ollama run devshub/knack --ask long_running
|
| 98 |
+
no 97%
|
| 99 |
```
|
| 100 |
|
| 101 |
+
What kind of command is it?
|
| 102 |
+
|
| 103 |
+
```
|
| 104 |
+
$ echo "pip install requests" | ollama run devshub/knack --ask activity \
|
| 105 |
+
--choice testing --choice building --choice installing --choice git --choice inspecting --choice running
|
| 106 |
+
installing 94%
|
| 107 |
+
$ echo "grep -rn TODO src" | ollama run devshub/knack --ask activity \
|
| 108 |
+
--choice testing --choice building --choice installing --choice git --choice inspecting --choice running
|
| 109 |
+
inspecting 95%
|
| 110 |
```
|
| 111 |
+
|
| 112 |
+
Does a pass prove the change works? Does it change git? Does it deploy?
|
| 113 |
+
|
| 114 |
+
```
|
| 115 |
+
$ echo "pytest tests/test_login.py" | ollama run devshub/knack --ask verifies
|
| 116 |
yes 97%
|
| 117 |
+
$ echo "npm run build" | ollama run devshub/knack --ask verifies
|
| 118 |
+
no 96%
|
| 119 |
+
$ echo "git commit -am 'fix login'" | ollama run devshub/knack --ask mutates_repo
|
| 120 |
+
yes 96%
|
| 121 |
+
$ echo "git diff" | ollama run devshub/knack --ask mutates_repo
|
| 122 |
+
no 97%
|
| 123 |
+
$ echo "kubectl apply -f k8s/" | ollama run devshub/knack --ask deploys
|
| 124 |
+
yes 95%
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
### Questions about a message to a coding assistant
|
| 128 |
+
|
| 129 |
+
What kind of task is this?
|
| 130 |
+
|
| 131 |
+
```
|
| 132 |
+
$ echo "fix the failing login test" | ollama run devshub/knack --ask task.intent \
|
| 133 |
+
--choice bug_fix --choice feature --choice refactor --choice api_schema --choice config_deploy \
|
| 134 |
+
--choice test --choice documentation --choice investigation --choice unknown
|
| 135 |
+
bug_fix 90%
|
| 136 |
```
|
| 137 |
|
| 138 |
+
With the same `--choice` list: "add dark mode to the settings page" gives `feature 93%`,
|
| 139 |
+
"write docs for the payments API" gives `documentation 97%`, and "why does the build take
|
| 140 |
+
so long?" gives `investigation 97%`.
|
| 141 |
+
|
| 142 |
+
Is it chat or a request for work?
|
| 143 |
|
| 144 |
+
```
|
| 145 |
+
$ echo "hi, how are you?" | ollama run devshub/knack --ask turn.chat_or_task --choice chat --choice task
|
| 146 |
+
chat 98%
|
| 147 |
+
$ echo "rename the user module" | ollama run devshub/knack --ask turn.chat_or_task --choice chat --choice task
|
| 148 |
+
task 97%
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
Which assistant mode fits?
|
| 152 |
+
|
| 153 |
+
```
|
| 154 |
+
$ echo "what does this repo do?" | ollama run devshub/knack --ask route.mode --choice plan --choice build --choice ask --choice debug
|
| 155 |
+
ask 96%
|
| 156 |
+
$ echo "plan the migration to Postgres" | ollama run devshub/knack --ask route.mode --choice plan --choice build --choice ask --choice debug
|
| 157 |
+
plan 90%
|
| 158 |
+
```
|
| 159 |
|
| 160 |
+
Start or stop a screen recording?
|
| 161 |
|
| 162 |
```
|
| 163 |
+
$ echo "record my screen" | ollama run devshub/knack --ask turn.screencast --choice start --choice stop --choice none
|
| 164 |
+
start 89%
|
|
|
|
|
|
|
|
|
|
| 165 |
```
|
| 166 |
|
| 167 |
+
The answer is the option Knack picks and its confidence. Each id has one precise meaning,
|
| 168 |
+
listed in the tables below; read them before relying on an answer. `long_running`, for
|
| 169 |
+
example, means "takes minutes", so a build counts. Questions with options (`--choice`,
|
| 170 |
+
`--level`) need them in the order shown; if they do not match, the error shows the exact
|
| 171 |
+
flags to use. Any question that is not one of the 29 ids is rejected rather than guessed.
|
| 172 |
|
| 173 |
## API
|
| 174 |
|
|
|
|
| 285 |
refund requested?", is rejected. Use a general decision model like clef for those.
|
| 286 |
- **Other input.** Logs, emails, tickets, documents or images give meaningless answers,
|
| 287 |
even to these 29 questions.
|
| 288 |
+
- **Conversation history.** Through Ollama it sees a single message, so a question like
|
| 289 |
+
`turn.resume` ("continue where you left off") answers no: there is nothing to resume. Inside CodeSync it also
|
| 290 |
gets the session context, which makes the turn questions more reliable.
|
| 291 |
- **Text generation.** It returns one pick with a confidence, never sentences.
|
| 292 |
|
|
|
|
| 299 |
| `tail -f app.log` | `serves` | no, 75% | yes |
|
| 300 |
| `npm run build` | `serves` | yes, 79% | no |
|
| 301 |
| `docker compose up` | `long_running` | 51% yes | yes |
|
| 302 |
+
| `curl --fail http://localhost:3000/health` | `runtime_check` | no, 92% | yes |
|
| 303 |
| `npm test` | `long_running` | 45% yes | unclear, depends on the suite |
|
| 304 |
|
| 305 |
+
These come from the model's training, not the Ollama packaging: on every command compared,
|
| 306 |
+
the Ollama build matches the original model to within 0.002. They are the next training targets.
|
| 307 |
|
| 308 |
## Results
|
| 309 |
|