--- license: other license_name: kailu-3-pro-license license_link: https://huggingface.co/KvcHub/KaiLu-3-Pro/blob/main/LICENSE language: - en library_name: transformers pipeline_tag: text-generation tags: - kailu - kvchub - lfm2 - gguf - small-language-model - conversational datasets: - HuggingFaceFW/fineweb-edu - HuggingFaceTB/smollm-corpus - DKYoon/SlimPajama-6B - HuggingFaceTB/finemath - wikimedia/wikipedia - OpenCoder-LLM/opc-annealing-corpus - allenai/dolmino-mix-1124 - HuggingFaceTB/smol-smoltalk - allenai/tulu-3-sft-personas-instruction-following - meta-math/MetaMathQA - openai/gsm8k - cais/mmlu - allenai/ai2_arc - openai/openai_humaneval - MuskumPillerum/General-Knowledge - HuggingFaceH4/ultrafeedback_binarized - Intel/orca_dpo_pairs - nvidia/HelpSteer2 - Anthropic/hh-rlhf extra_gated_heading: "KaiLu 3 Pro License (Version 1.0, November 2026)" extra_gated_prompt: "Copyright (c) 2026 KvcHub. All rights reserved except as granted in the [KaiLu 3 Pro License](https://huggingface.co). Free for personal, non-commercial use only (hobby projects, learning, teaching, and non-commercial research). Business or commercial use—including paid products/services, ad-supported apps, paid APIs, internal company work, or paid client work—is prohibited without prior written permission from KvcHub (hello@kvchub.com). Provided as is without warranty." extra_gated_fields: I have read and agree to the KaiLu 3 Pro License: checkbox I confirm my use is strictly personal and non-commercial: checkbox Full Name: text extra_gated_button_content: "Agree and Request Access" --- # KaiLu 3 Pro KaiLu 3 Pro is a 1-billion-parameter chat model trained from scratch by [KvcHub](https://kvchub.com). It is small enough to run on a laptop: about 1.1 GB as a GGUF, fast on a CPU and faster on Apple Silicon or a GPU. It is open source under the Apache License 2.0. ## Files | File | What it is | |---|---| | `KaiLu-3-Pro-Q8_0.gguf` | The whole model in one file for llama.cpp, Ollama and LM Studio: 8-bit weights, tokenizer and chat template (1.09 GB). | | `model.safetensors` | The full-precision weights (bfloat16) in one file for Transformers (2.07 GB). It also holds 6 `vision_projector.*` tensors from KaiLu's experimental image add-on; Transformers skips them, and they don't work on their own. | | `config.json`, `generation_config.json`, `tokenizer.json`, `tokenizer_config.json`, `chat_template.jinja` | Settings, tokenizer and chat format for Transformers. | | `Modelfile`, `template`, `params` | Ollama setup: chat format, temperature 0.2, stop words. | ## Use it Download everything with `hf download KvcHub/KaiLu-3-Pro --local-dir KaiLu-3-Pro`, or only the GGUF with `hf download KvcHub/KaiLu-3-Pro KaiLu-3-Pro-Q8_0.gguf Modelfile --local-dir KaiLu-3-Pro`. **Ollama** ``` ollama run hf.co/KvcHub/KaiLu-3-Pro ``` The repo's `template` and `params` files give Ollama KaiLu's chat format and settings. In a downloaded folder, `ollama create kailu-3-pro -f Modelfile` does the same. **llama.cpp** ``` llama-cli -m KaiLu-3-Pro-Q8_0.gguf --jinja -c 1024 --temp 0.2 llama-server -m KaiLu-3-Pro-Q8_0.gguf --jinja -c 1024 # OpenAI-compatible API on http://localhost:8080 ``` **LM Studio:** import `KaiLu-3-Pro-Q8_0.gguf`. The chat template is stored in the file. **Transformers** (4.54 or newer) ```python from transformers import AutoModelForCausalLM, AutoTokenizer path = "KvcHub/KaiLu-3-Pro" # or a local folder tok = AutoTokenizer.from_pretrained(path) model = AutoModelForCausalLM.from_pretrained(path, dtype="bfloat16") messages = [{"role": "user", "content": "What is the capital of France?"}] prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = tok(prompt, return_tensors="pt") out = model.generate(**inputs, max_new_tokens=200, do_sample=False) print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)) ``` A low temperature (0 to 0.3) gives the best answers; at 0.7 a model this size wanders. ## Chat format ``` <|system|> You are KaiLu, a helpful assistant. <|user|> Who are you? <|assistant|> I'm KaiLu 3 Pro, an AI assistant created by KvcHub.<|endoftext|> ``` If there's no system message, the template adds the default one above. Each assistant reply ends with `<|endoftext|>` (token 0). KaiLu also learned to reason inside `...` when asked, for example with the system message `You are KaiLu, a helpful assistant. Mode: reasoning=medium. Think step-by-step inside ... before your final answer.` ## Model details | | | |---|---| | Parameters | 1,027,304,448 | | Layers | 36: 24 gated short-convolution layers (kernel 3) and 12 attention layers (every third layer) | | Width | hidden 1,536, SwiGLU feed-forward 4,096 | | Attention | 24 query heads, 6 key-value heads (grouped-query), QK-norm, RoPE theta 1,000,000 | | Context | trained on 1,024-token windows | | Vocabulary | 32,768 tokens (byte-level BPE, trained by KvcHub) | | Embeddings | input and output shared | | Format | `Lfm2ForCausalLM`. KaiLu 3 Pro uses LFM2's layer layout only: it was trained from scratch and contains no LFM2 weights. | ## How it was made 1. **KaiLu 3 base (329M parameters):** pretrained from scratch on 6.6B tokens of educational web text (FineWeb-Edu), synthetic textbooks (Cosmopedia v2), web and books (SlimPajama-6B, without Books3), math (FineMath), Wikipedia and code (OpenCoder annealing). Then fine-tuned on smol-smoltalk conversations, and preference-tuned (DPO) on UltraFeedback, HelpSteer2 and Anthropic HH-RLHF pairs. 2. **Grown to 1B:** widened (hidden 1,024 to 1,536) and deepened (24 to 36 layers) with a function-preserving expansion, so it started from what the 329M model already knew. 3. **Further pretraining:** including the Dolmino Mix (DCLM web text, StackExchange, peS2o papers, FLAN and math). 4. **Fine-tuning:** Tulu 3 persona instruction-following, MetaMathQA, GSM8K, MMLU, ARC-Challenge, HumanEval and General-Knowledge, plus examples written by KvcHub (step-by-step reasoning in ``, coding in several languages, and who KaiLu is). 5. **Preference tuning (DPO, beta 0.1):** pairs from UltraFeedback (binarized) and Orca DPO pairs. The datasets are listed in this card's metadata. Each keeps its own license and terms. ## Limitations - **It's a small model.** It gets facts wrong, sometimes confidently (for example, it once answered "Japan is the capital of Japan"), and it can invent details. Don't rely on it for facts, medical, legal or financial advice. - **Short memory.** It was trained on 1,024-token windows. It often doesn't use what you said earlier in a chat (asked "What is my name?" right after giving it, it says it doesn't know personal details), and it may answer only part of a multi-part question. - **English only.** - **No benchmark scores here, on purpose.** The test sets of MMLU, ARC-Challenge and HumanEval, and parts of GSM8K, were used in fine-tuning, so the model's scores on those benchmarks would overstate its ability. Evaluate it on data it hasn't seen. - **Text only.** The `vision_projector.*` tensors need KaiLu's own image encoder pipeline, which isn't part of this release. ## License Copyright 2026 KvcHub. Licensed under the Apache License, Version 2.0 (see `LICENSE`). You may use, modify and redistribute the model, including commercially, under its terms. ## Security & KvcHub Model Comparison See [`SECURITY.md`](./SECURITY.md) for the full threat model, deployment checklist, and vulnerability reporting policy. ### KvcHub Model Security Comparison | Model | Task | Params | Weight Format (Pickle-Free) | Runtime Isolation | Training Provenance | Data / Secret Hygiene | Supply-Chain & Checksums | License | |---|---|---:|---|---|---|---|---|---| | **[Kava-Privacy-30M](https://huggingface.co/KvcHub/Kava-Privacy-30M)** | PII Redaction (36 langs, 30 entities) | 30.46M | `safetensors` (Yes) | 100% local / offline (Transformers, CPU/MPS/CUDA) | 100% from scratch | Synthetic 36-lang + CC-BY-4.0/Apache-2.0 synthetic PII; no real user PII; zero-hallucination span tagging | HF LFS SHA-256 + `eval_results.json` | Apache-2.0 | | **[Kava-Privacy-2.01M-mlx](https://huggingface.co/KvcHub/Kava-Privacy-2.01M-mlx)** | PII Redaction (EN, 16 entities) | 2.01M | `safetensors` (Yes) | 100% local / offline (Apple MLX) | 100% from scratch | Fully synthetic training data; zero cloud calls | HF LFS SHA-256 (`kava_privacy.py` custom loader) | MIT | | **[Kava-Privacy-636k-mlx](https://huggingface.co/KvcHub/Kava-Privacy-636k-mlx)** | PII Redaction (EN, 9 entities) | 636K | `safetensors` (Yes) | 100% local / offline (Apple MLX) | 100% from scratch | Fully synthetic training data; zero cloud calls | HF LFS SHA-256 (`kava_privacy.py` custom loader) | MIT | | **[KaiLu-3-Pro](https://huggingface.co/KvcHub/KaiLu-3-Pro)** | Conversational LM | 1.03B | `safetensors` + `GGUF` (Yes) | 100% local / offline (llama.cpp, Ollama, Transformers) | 100% from scratch | Public open corpora + DPO (UltraFeedback, HelpSteer2, HH-RLHF); no formal red-team audit | Explicit `SHA256SUMS` + HF LFS SHA-256 | Apache-2.0 | | **[KaiLu-3-Mini](https://huggingface.co/KvcHub/KaiLu-3-Mini)** | Conversational LM | 329M | `safetensors` + `GGUF` (Yes) | 100% local / offline (Transformers, llama.cpp) | 100% from scratch | Public open corpora + DPO (UltraFeedback, HelpSteer2, HH-RLHF); no formal red-team audit | HF LFS SHA-256 | KaiLu-3 License (Non-commercial) | | **[KaiLu-Web](https://huggingface.co/KvcHub/KaiLu-Web)** | In-Browser Chat LM | 329M / 1.03B | Split `GGUF` (Yes) | Browser WebAssembly sandbox (`wllama`); zero server calls | Packaged from KaiLu-3 / 3-Pro | Same as KaiLu-3 / 3-Pro; browser COOP/COEP isolation | HF LFS SHA-256 | Per-file (Apache-2.0 / KaiLu-3) | | **[KaiLu-2-2B-GGUF](https://huggingface.co/KvcHub/KaiLu-2-2B-GGUF)** | Reasoning & Chat LM | 1.90B | `GGUF` F16–Q2_K (Yes) | 100% local / offline (llama.cpp) | 100% from scratch (distilled text mix) | Public open datasets + synthetic reasoning; no formal safety red-teaming | HF LFS SHA-256 + `stats.json` | Apache-2.0 | | **[KaiLu-1-933M](https://huggingface.co/KvcHub/KaiLu-1-933M)** | Mobile / Desktop Chat LM | 933M | `safetensors` + `GGUF` (Yes) | 100% local / offline (Apple MLX / mobile GGUF) | 100% from scratch | Offline on-device execution; legacy v1 release | HF LFS SHA-256 | Apache-2.0 | | **[Ki-Complete-7B](https://huggingface.co/KvcHub/Ki-Complete-7B)** | Code Autocomplete (FIM) | 7B (LoRA r=64) | `GGUF` + PEFT `safetensors` (Yes) | 100% local / offline (`llama-server` on `127.0.0.1`) | Fine-tuned on `Qwen2.5-Coder-7B` | Permissive-license code only; pre-training secret/key scan + extension blocks novel key-shaped strings | HF LFS SHA-256 | Apache-2.0 | | **[Ki-Complete-1.5B](https://huggingface.co/KvcHub/Ki-Complete-1.5B)** | Code Autocomplete (FIM) | 1.5B (LoRA r=64) | `GGUF` + PEFT `safetensors` (Yes) | 100% local / offline (`llama-server` on `127.0.0.1`) | Fine-tuned on `Qwen2.5-Coder-1.5B` | Permissive-license code only; pre-training secret/key scan + extension blocks novel key-shaped strings | HF LFS SHA-256 | Apache-2.0 | ### KvcHub Model Benchmark Comparison #### 1. PII Redaction Family (`Kava-Privacy`) | Model | Params | Languages | Entities | Architecture | Primary Benchmark Result | False-Positive / Hard-Neg Check | Speed (Apple Silicon) | |---|---:|---:|---:|---|---|---|---| | **[Kava-Privacy-30M](https://huggingface.co/KvcHub/Kava-Privacy-30M)** | 30.46M | **36** | **30** (61 BIO) | ModernBERT (from scratch) | Held-out test Exact Span **F1 0.9146** (P 0.8952 / R 0.9348) | Hard-Neg FPR: **0.0** | **33.3 docs/sec** (MPS) | | **[Kava-Privacy-2.01M-mlx](https://huggingface.co/KvcHub/Kava-Privacy-2.01M-mlx)** | 2.01M | 1 (EN) | 16 | MLX Encoder (from scratch) | Adversarial 100% (12/12) · Zero-shot OOD 87.5% | 0% on physics/subnet/legal/ticker suite | 2.2 ms / doc (MLX) | | **[Kava-Privacy-636k-mlx](https://huggingface.co/KvcHub/Kava-Privacy-636k-mlx)** | 636K | 1 (EN) | 9 | 4L MLX Encoder (from scratch) | Synthetic val token acc 99.6%–100.0% across 9 tags | Synthetic val O-tag acc 100.0% | Sub-ms (2.4 MB weights) | #### 2. Conversational & Reasoning LM Family (`KaiLu`) | Model | Params | Architecture | Context (Trained) | Footprint (Recommended) | Speed (Apple Silicon) | Reported Benchmarks | |---|---:|---|---|---|---|---| | **[KaiLu-3-Pro](https://huggingface.co/KvcHub/KaiLu-3-Pro)** | 1.03B | LFM2 Hybrid (36L) | 1,024 (51K cfg) | 1.09 GB (`Q8_0` GGUF) / 2.07 GB (bf16) | Local CPU/Metal/Ollama | Benchmarks intentionally omitted (MMLU/ARC/HumanEval/GSM8K included in SFT; evaluate on unseen data) | | **[KaiLu-3-Mini](https://huggingface.co/KvcHub/KaiLu-3-Mini)** | 329M | LFM2 Hybrid (24L) | 1,024 | `model.safetensors` + `kailu-3.gguf` | Local CPU/Metal | Pretrained on 6.6B tokens + 460K SFT + 60K DPO pairs (no formal eval table published) | | **[KaiLu-Web](https://huggingface.co/KvcHub/KaiLu-Web)** | 329M / 1.03B | LFM2 Hybrid (`wllama` WASM) | 1,024 | 351 MB (`3-Q8_0`) / 623 MB (`3-Pro-Q4_K_M`) | In-browser WASM | Browser-packaged builds of KaiLu-3-Mini & KaiLu-3-Pro | | **[KaiLu-2-2B-GGUF](https://huggingface.co/KvcHub/KaiLu-2-2B-GGUF)** | 1.90B | LFM2 Hybrid (104L) | 1,024 (4K GGUF) | 1.17 GB (`Q4_K_M`, 1.51 GB RAM) | **107 tok/s** GPU / 64 tok/s CPU (`Q4_K_M`) | Held-out PPL **11.003** (F16) / **11.077** (`Q4_K_M`); 8th-grade math **75.0%**; Random math **43.3%**; Unseen-vocab IQ **72.5%** | | **[KaiLu-1-933M](https://huggingface.co/KvcHub/KaiLu-1-933M)** | 933M | MLX Transformer | — | 546 MB mobile GGUF (1.15 GB RAM) | **260+ tok/s** (Apple Silicon) | Legacy v1 baseline (no formal benchmark suite published) | #### 3. Code Autocomplete Family (`Ki-Complete`) — Measured on Apple M5 Pro (`llama.cpp`, `Q8_0`) | Model | Params | Base Model | HumanEval-Infill (1-line) | HumanEval-Infill (multi-line) | HumanEval-Infill (mid-line) | Real Code Exact Line (no ctx / w/ ctx) | Unwanted Extra Lines | Latency (no ctx / w/ ctx) | |---|---:|---|---:|---:|---:|---:|---:|---:| | **[Ki-Complete-7B](https://huggingface.co/KvcHub/Ki-Complete-7B)** | 7B | Qwen2.5-Coder-7B | **95.0%** | **53.5%** | **46.3%** | **49.7% / 37.7%** · **52.9% / 41.7%** | 4% (vs 42% base) | 1.00 s / 4.5 s | | **[Ki-Complete-1.5B](https://huggingface.co/KvcHub/Ki-Complete-1.5B)** | 1.5B | Qwen2.5-Coder-1.5B | 89.4% | 53.4% | 40.9% | 44.0% / 36.0% · 45.1% / 38.6% | **3%** (vs 65% base) | **0.23 s / 1.1 s** |