Instructions to use KvcHub/Ki-Complete-1.5B 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 KvcHub/Ki-Complete-1.5B 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 KvcHub/Ki-Complete-1.5B:Q8_0 # Run inference directly in the terminal: llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0 # Run inference directly in the terminal: llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0
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 KvcHub/Ki-Complete-1.5B:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0
Use Docker
docker model run hf.co/KvcHub/Ki-Complete-1.5B:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use KvcHub/Ki-Complete-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KvcHub/Ki-Complete-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KvcHub/Ki-Complete-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KvcHub/Ki-Complete-1.5B:Q8_0
- Ollama
How to use KvcHub/Ki-Complete-1.5B with Ollama:
ollama run hf.co/KvcHub/Ki-Complete-1.5B:Q8_0
- Unsloth Desktop
- Pi
How to use KvcHub/Ki-Complete-1.5B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "KvcHub/Ki-Complete-1.5B:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use KvcHub/Ki-Complete-1.5B with Docker Model Runner:
docker model run hf.co/KvcHub/Ki-Complete-1.5B:Q8_0
- Lemonade
How to use KvcHub/Ki-Complete-1.5B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KvcHub/Ki-Complete-1.5B:Q8_0
Run and chat with the model
lemonade run user.Ki-Complete-1.5B-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use KvcHub/Ki-Complete-1.5B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0
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:9931/v1 hermes config set model.default KvcHub/Ki-Complete-1.5B:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use KvcHub/Ki-Complete-1.5B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0
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:9931/v1 \ --custom-model-id "KvcHub/Ki-Complete-1.5B:Q8_0" \ --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"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0# Run inference directly in the terminal:
llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0Build 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 KvcHub/Ki-Complete-1.5B:Q8_0# Run inference directly in the terminal:
./build/bin/llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0Use Docker
docker model run hf.co/KvcHub/Ki-Complete-1.5B:Q8_0Ki Complete 1.5B
KvcHub's code autocomplete model: it writes the grey suggestion as you type in your editor, running on your own computer. It powers the Ki Complete extension for VS Code and editors built on it (such as Antigravity).
Ki Complete 1.5B is Qwen2.5-Coder-1.5B fine-tuned by KvcHub for editor moments: finish the line you're typing and stop, write the block when a line opens one, write the next line on a fresh line, and write nothing when nothing is missing.
| File | What it is |
|---|---|
ki-complete-1.5b-q8_0.gguf |
The model for llama.cpp (Q8_0, 1.65 GB, about 2 GB of memory) |
adapter/ |
The LoRA (rank 64) for use with Hugging Face PEFT on top of Qwen/Qwen2.5-Coder-1.5B |
LICENSE |
Apache-2.0 |
Use
In the Ki Complete extension it's the default model. With llama.cpp directly:
llama-server -hf KvcHub/Ki-Complete-1.5B:Q8_0 --port 8012 -b 1024 -ub 1024 --cache-reuse 256
curl http://127.0.0.1:8012/infill -d '{"input_prefix": "def add(a, b):\n", "prompt": " ", "input_suffix": "\n", "n_predict": 64}'
The prompt format is Qwen2.5-Coder's fill-in-the-middle, exactly as llama.cpp's /infill builds it:
<|repo_name|>myproject\n<|file_sep|>filename\n<|fim_prefix|>{code before the cursor}<|fim_suffix|>{code after}<|fim_middle|>; pieces of other files can go before the last <|file_sep|> as <|file_sep|>{name}\n{code}. The model ends its answer with <|endoftext|> or <|fim_pad|>.
With PEFT:
from transformers import AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B")
model = PeftModel.from_pretrained(base, "KvcHub/Ki-Complete-1.5B", subfolder="adapter")
Results
On tasks it never trained on, through Ki Complete's own suggestion logic, on llama.cpp:
| Qwen2.5-Coder-1.5B | Ki Complete 1.5B | |
|---|---|---|
| HumanEval-Infilling, one missing line (1,033): tests pass | 88.4% | 89.4% |
| HumanEval-Infilling, several missing lines (1,000): tests pass | 50.8% | 53.4% |
| HumanEval-Infilling, gap starting mid-line (164): tests pass | 42.7% | 40.9% |
| Real code (700 spots): rest of the line exactly right | 30.9% / 39.7% | 36.0% / 44.0% |
| Same, with pieces of related files as context | 33.7% / 41.1% | 38.6% / 45.1% |
| Answers padded with extra lines nobody asked for | 65% | 3% |
| Tokens written per suggestion | 65 | 12 |
| Typical wait for a suggestion (Apple M5 Pro) | 586 ms | 228 ms |
The real-code spots come from KvcHub's own projects (Python, JavaScript, HTML, shell), split into two halves. While typing on the same line, the server reuses its work and suggestions typically take about 0.1 seconds.
Training
- Examples: 120,000 editor moments, in exactly the format llama.cpp sends: 41% part-way through a line, 35% on a fresh line, 9% a gap of up to three lines, 15% where nothing is missing. A quarter include pieces of other files from the same project.
- Code: permissively licensed files (MIT, Apache-2.0, BSD, ISC and similar) in 15 languages from codeparrot/github-code-clean, plus about 10% from KvcHub's own projects (only files that parse; the test files and near-copies of them excluded).
- Method: LoRA rank 64 on every attention and MLP layer (74M trainable parameters), loss only on the missing code, 989 steps over 10 hours on an Apple M5 Pro (about 40,000 examples seen). Validation loss on projects never trained on: 0.681 before, 0.578 after.
- Credentials: the training files were scanned for keys and tokens; the model doesn't reproduce them (it is no more likely to write any of them than the base model, which never saw them). The Ki Complete extension also never suggests a key-shaped string that isn't already in your file.
Limits
- It's a 1.5B model: strong at finishing lines and short blocks, weaker than large cloud models at long multi-line code.
- Trained to finish lines and stop, so it does slightly worse than the base model when asked to fill gaps that start and end at random points mid-line.
- Mostly English code and comments.
License and credits
Apache-2.0. Ki Complete 1.5B is a modified version of Qwen2.5-Coder-1.5B by the Qwen team (Apache-2.0): KvcHub fine-tuned it with a LoRA, merged into the GGUF weights. Training data from codeparrot/github-code-clean (permissively licensed files only); evaluation with HumanEval-Infilling (OpenAI, MIT); runs with llama.cpp (MIT).
- Downloads last month
- -
8-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf KvcHub/Ki-Complete-1.5B:Q8_0# Run inference directly in the terminal: llama cli -hf KvcHub/Ki-Complete-1.5B:Q8_0