Instructions to use Hanish/lq-decide-1.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hanish/lq-decide-1.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Hanish/lq-decide-1.7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Hanish/lq-decide-1.7b") model = AutoModelForCausalLM.from_pretrained("Hanish/lq-decide-1.7b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Hanish/lq-decide-1.7b 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 Hanish/lq-decide-1.7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Hanish/lq-decide-1.7b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Hanish/lq-decide-1.7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf Hanish/lq-decide-1.7b:Q4_K_M
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 Hanish/lq-decide-1.7b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Hanish/lq-decide-1.7b:Q4_K_M
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 Hanish/lq-decide-1.7b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Hanish/lq-decide-1.7b:Q4_K_M
Use Docker
docker model run hf.co/Hanish/lq-decide-1.7b:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Hanish/lq-decide-1.7b with Ollama:
ollama run hf.co/Hanish/lq-decide-1.7b:Q4_K_M
- Unsloth Desktop
- Pi
How to use Hanish/lq-decide-1.7b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Hanish/lq-decide-1.7b: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": "Hanish/lq-decide-1.7b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Hanish/lq-decide-1.7b with Docker Model Runner:
docker model run hf.co/Hanish/lq-decide-1.7b:Q4_K_M
- Lemonade
How to use Hanish/lq-decide-1.7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Hanish/lq-decide-1.7b:Q4_K_M
Run and chat with the model
lemonade run user.lq-decide-1.7b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Hanish/lq-decide-1.7b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Hanish/lq-decide-1.7b: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 Hanish/lq-decide-1.7b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Hanish/lq-decide-1.7b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Hanish/lq-decide-1.7b: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 "Hanish/lq-decide-1.7b: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"
LQ-Decide 1.7B
A model that answers typed decisions instead of generating text. You give it a state and a fixed option set; it returns a probability distribution over those options from a single forward pass. Nothing is sampled, so the output cannot be malformed and there is nothing to parse or repair.
Built by Hanish Keloth for LocalQuill, a private on-device AI
keyboard and offline chat app. Trained from Qwen/Qwen3-1.7B. A smaller
0.6B version is also available.
Results
Two labelled public fixtures from the SemIf project, never seen in training. Balanced accuracy, three options per item, chance is 0.333.
| authored144 | perturbations108 | |
|---|---|---|
| LQ-Decide 1.7B, Q8_0 GGUF | 0.812 | — |
| LQ-Decide 1.7B, bf16 | 0.797 | 0.628 |
| LQ-Decide 1.7B, Q4_K_M GGUF | 0.762 | — |
| LQ-Decide 0.6B, Q8_0 | 0.750 | 0.586 |
| SemIf, Qwen3.5-4B, published | 0.813 | — |
| Jev (TypeSafe, closed), published | 0.883 on 102 aligned rows | — |
The bf16 row is measured through transformers and the GGUF rows through llama.cpp; the 0.015 spread between bf16 and Q8_0 is within noise on 144 items and should not be read as quantization improving the model.
Per family, bf16, permutation-averaged:
| family | authored144 | perturbations108 |
|---|---|---|
| evidence interpretation | 0.812 | 0.667 |
| rule application | 0.771 | 0.556 |
| candidate selection | 0.771 | 0.583 |
The perturbation set contains modified variants of the same items and is the better test of whether the model reads the distinction or the wording. The gap between 0.797 and 0.628 is the honest measure of how much of this is robust.
Quantization costs real accuracy here
Measured on both sizes, same fixture, same prompts:
| model | Q8_0 | Q4_K_M | difference | median latency Q8 → Q4 |
|---|---|---|---|---|
| 0.6B | 0.750 | 0.703 | −4.7 | 37 ms → 36 ms |
| 1.7B | 0.812 | 0.762 | −5.0 | 67 ms → 59 ms |
Because the entire output is a probability over a handful of option tokens, four-bit error lands directly on the thing you read rather than being spread across generated text. Use Q8_0. Q4_K_M buys file size and, at 1.7B, eight milliseconds, for five points of accuracy.
Calibration
A single temperature constant, fitted on a held-out split, shipped in calibration.json.
| expected calibration error | |
|---|---|
| raw | 0.161 |
| after T = 2.3 | 0.039 |
| after T = 2.3, permutation-averaged | 0.031 |
Averaging logits over all option orderings costs nothing in accuracy, improves calibration, and removes position bias in the option list. Apply the temperature before reading probabilities as confidence.
Latency
llama.cpp on an Apple M5 Max, 147-token prompts, one decision per request:
| quant | median | p95 | size |
|---|---|---|---|
| Q4_K_M | 59 ms | 72 ms | 1,056 MB |
| Q8_0 | 67 ms | 81 ms | 1,749 MB |
No phone measurement is published, by us or, as far as we can find, by anyone else working on this pattern. Do not assume desktop numbers transfer to a handset.
Use
import torch, json
from transformers import AutoTokenizer, AutoModelForCausalLM
LETTERS = "ABCDEFGHIJKLMNOP"
SYSTEM = ("Apply the supplied criterion to the supplied evidence. Choose exactly one listed option. "
"Respond with only its uppercase letter, with no explanation or reasoning.")
tok = AutoTokenizer.from_pretrained("Hanish/lq-decide-1.7b")
model = AutoModelForCausalLM.from_pretrained("Hanish/lq-decide-1.7b", dtype=torch.bfloat16).eval()
T = 2.3 # calibration.json
def decide(state, question, options):
payload = {"evidence": state, "criterion": question,
"options": [{"letter": LETTERS[i], "description": d} for i, d in enumerate(options)]}
msgs = [{"role": "system", "content": SYSTEM},
{"role": "user", "content": json.dumps(payload, ensure_ascii=False)}]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True, enable_thinking=False)
ids = tok(text, return_tensors="pt")
with torch.no_grad():
logits = model(**ids).logits[0, -1]
sel = torch.tensor([logits[tok.encode(LETTERS[i], add_special_tokens=False)[0]]
for i in range(len(options))]).float()
return torch.softmax(sel / T, -1).tolist()
print(decide(
"The optician ordered replacement lenses. The workshop confirms they have not yet been fitted.",
"Assess the claim: the replacement lenses have been fitted.",
["The evidence establishes the claim",
"The evidence does not establish either",
"The evidence establishes the opposite"]))
The prompt format matters; the model was trained on exactly this template, with options shuffled and the answer letter
re-based so it reads descriptions rather than positions. With llama-server, request one token with logprobs and read
the probability mass on the option letters.
Training
LoRA rank 32 on all projections, merged. Loss on the single answer-letter token only. Options permuted and the letter set re-based every epoch. 117,096 rows, two epochs, 19,516 steps, about 2 h 50 m on one L40S.
Data: Hanish/lq-decide-data, 141,038 rows, every source licence-tagged and non-commercial sources excluded. 57,096 rows are synthetic items in three decision families, where the intended answer was fixed before generation so the teacher only wrote surface text and never supplied a label. The evaluation fixtures were never trained on, generated from, or shown to the teacher.
Limitations
- English only.
- Three to sixteen options; not tested beyond that.
- Perturbation robustness is well below clean-fixture accuracy, 0.628 against 0.797.
- Not compared against Laya or other recent decision models, which publish on their own benchmarks; this one has not been run on them. The table above is not a ranking against anything not in it.
Credits
Base model Qwen/Qwen3-1.7B (Apache-2.0, Alibaba). Evaluation fixtures from the SemIf project (MIT). Synthetic data
generated with Ornith-1.5-35B-A3B (MIT). The interface pattern follows TypeSafe's Jev, a separate closed product; this
model is not affiliated with or endorsed by it.
- Downloads last month
- 48