Instructions to use KvcHub/Ki-Complete-7B 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-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 KvcHub/Ki-Complete-7B:Q8_0 # Run inference directly in the terminal: llama cli -hf KvcHub/Ki-Complete-7B: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-7B:Q8_0 # Run inference directly in the terminal: llama cli -hf KvcHub/Ki-Complete-7B: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-7B:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf KvcHub/Ki-Complete-7B:Q8_0
Use Docker
docker model run hf.co/KvcHub/Ki-Complete-7B:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use KvcHub/Ki-Complete-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KvcHub/Ki-Complete-7B" # 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-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KvcHub/Ki-Complete-7B:Q8_0
- Ollama
How to use KvcHub/Ki-Complete-7B with Ollama:
ollama run hf.co/KvcHub/Ki-Complete-7B:Q8_0
- Unsloth Desktop
- Pi
How to use KvcHub/Ki-Complete-7B 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-7B: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-7B:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use KvcHub/Ki-Complete-7B with Docker Model Runner:
docker model run hf.co/KvcHub/Ki-Complete-7B:Q8_0
- Lemonade
How to use KvcHub/Ki-Complete-7B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KvcHub/Ki-Complete-7B:Q8_0
Run and chat with the model
lemonade run user.Ki-Complete-7B-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use KvcHub/Ki-Complete-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 KvcHub/Ki-Complete-7B: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-7B:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use KvcHub/Ki-Complete-7B 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-7B: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-7B: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"
Ki Complete 7B
KvcHub's larger code autocomplete model. It writes the suggestion as you type in your editor, running on your own computer, and it's the most accurate model in the Ki Complete extension for VS Code and editors built on it (such as Antigravity). The smaller Ki Complete 1.5B is about 4 times quicker and stays the default; choose the 7B if accuracy matters more to you than speed and your computer has 16 GB of memory or more.
Ki Complete 7B is Qwen2.5-Coder-7B 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.
Get the extension: in VS Code, install Ki Complete from the Visual Studio Marketplace; in Antigravity or any editor that uses Open VSX, install Ki Complete from Open VSX (kvchub.ki-complete, published by KvcHub). Then pick Ki Complete 7B from the Ki status bar menu, under Model (version 0.3.0 and later). More at kvchub.com.
| File | What it is |
|---|---|
ki-complete-7b-q8_0.gguf |
The model for llama.cpp (Q8_0, 8.1 GB, about 9 GB of memory) |
adapter/ |
The LoRA (rank 64) for use with Hugging Face PEFT on top of Qwen/Qwen2.5-Coder-7B |
LICENSE |
Apache-2.0 |
Use
With llama.cpp directly:
llama-server -hf KvcHub/Ki-Complete-7B: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-7B")
model = PeftModel.from_pretrained(base, "KvcHub/Ki-Complete-7B", subfolder="adapter")
Results
On tasks it never trained on, through Ki Complete's own suggestion logic, on llama.cpp (Q8_0, Apple M5 Pro):
| Qwen2.5-Coder-7B | Ki Complete 7B | Ki Complete 1.5B | |
|---|---|---|---|
| Real code (700 spots, two halves): rest of the line exactly right | 47.4% / 36.6% | 49.7% / 37.7% | 43.1% / 35.7% |
| Same, similarity to the right answer | 77.7% / 70.3% | 78.8% / 72.1% | |
| Same, with pieces of related files as context | 50.0% / 41.7% | 52.9% / 41.7% | 45.1% / 38.9% |
| Answers padded with extra lines nobody asked for | 42% | 4% | 3% |
| Tokens written per suggestion | 24 | 11 | 11 |
| HumanEval-Infilling, one missing line (1,033): tests pass | 94.6% | 95.0% | 89.4% |
| HumanEval-Infilling, several missing lines (1,000): tests pass | 54.1% | 53.5% | 53.4% |
| HumanEval-Infilling, gap starting mid-line (164): tests pass | 48.2% | 46.3% | 40.9% |
| Typical wait for a suggestion on real code | 1.18 s | 1.00 s | 0.23 s |
| Typical wait with related files as context | 5.2 s | 4.5 s | 1.1 s |
The real-code spots come from KvcHub's own projects (Python, JavaScript, HTML, shell). While typing on the same line, the server reuses its work, so suggestions after the first are much quicker. Because the first suggestion with related files as context takes several seconds, the Ki Complete extension leaves that context off for this model unless you turn it on.
Training
- Examples: the same 120,000 editor moments as Ki Complete 1.5B, 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 (161M trainable parameters), loss only on the missing code, 396 steps over 10.8 hours on an Apple M5 Pro (PyTorch, then MLX), about 20,000 examples seen. Validation loss on projects never trained on: 0.449 before, 0.381 after.
- Credentials: the training files were scanned for keys and tokens before training. The Ki Complete extension also never suggests a key-shaped string that isn't already in your file.
Limits
- Slower than Ki Complete 1.5B: about 1 second for a fresh suggestion on an Apple M5 Pro, and more on older computers.
- 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 7B is a modified version of Qwen2.5-Coder-7B 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