Instructions to use aisulu-t/kai 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 aisulu-t/kai 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 aisulu-t/kai:Q4_K_M # Run inference directly in the terminal: llama cli -hf aisulu-t/kai:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aisulu-t/kai:Q4_K_M # Run inference directly in the terminal: llama cli -hf aisulu-t/kai: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 aisulu-t/kai:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf aisulu-t/kai:Q4_K_M
Use Docker
docker model run hf.co/aisulu-t/kai:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use aisulu-t/kai with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aisulu-t/kai" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aisulu-t/kai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aisulu-t/kai:Q4_K_M
- Ollama
How to use aisulu-t/kai with Ollama:
ollama run hf.co/aisulu-t/kai:Q4_K_M
- Unsloth Desktop
- Pi
How to use aisulu-t/kai with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aisulu-t/kai: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": "aisulu-t/kai:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use aisulu-t/kai with Docker Model Runner:
docker model run hf.co/aisulu-t/kai:Q4_K_M
- Lemonade
How to use aisulu-t/kai with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aisulu-t/kai:Q4_K_M
Run and chat with the model
lemonade run user.kai-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use aisulu-t/kai with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aisulu-t/kai: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 aisulu-t/kai:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use aisulu-t/kai with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aisulu-t/kai: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 "aisulu-t/kai: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"
Kai โ Safe AI Tutor for Kids (Gemma 4 E2B fine-tune)
Kai is a LoRA fine-tune of Google's Gemma 4 E2B (instruction-tuned, 4-bit) built as the on-device model for Safe AI Tutor for Kids, an early-childhood tutoring companion for children ages 3โ8. It is designed to run fully offline on low-cost Android tablets (~$100 class, 4 GB RAM), so that no child data ever leaves the device.
This repository contains the merged model exported to GGUF (Q4_K_M, 3,253.99 MiB) for on-device inference with llama.cpp-compatible runtimes.
What it is trained to do
- Socratic scaffolding, not answers โ guided questions and observation prompts that keep the child actively creating instead of passively consuming, with strict age-banded language (sentence caps of 8 / 12 / 20 words for ages 3โ4 / 5โ6 / 7โ8).
- Safety refusals and pivots โ warmly redirect unsafe or age-inappropriate requests (dangerous acts, violent or adult content) into safe alternatives, without lecturing.
- Inclusion by design โ persona variants include a literal mode with zero metaphors/idioms for neurodivergent learners, a soft calming mode, and Spanish and Kazakh code-switching modes.
- Knowing when it doesn't know โ a dedicated turn type trains the model to say it doesn't know when context is empty, instead of hallucinating.
Model details
- Base model:
unsloth/gemma-4-e2b-it-unsloth-bnb-4bit(Gemma 4 E2B, instruction-tuned) - Adaptation: QLoRA โ rank 16, alpha 16, dropout 0, targeting all linear projections (q, k, v, o, gate, up, down); 31,039,488 of 5,154,217,504 parameters trained (0.60%)
- Training: SFT, 1 epoch over 564 examples (effective batch size 8, learning rate 2e-4, warmup 5 steps, max sequence length 2048), on an NVIDIA A100-SXM4-40GB
- Frameworks: Unsloth, TRL, PEFT 0.19.1, Transformers
- Export: merged to 16-bit, converted and quantised with llama.cpp to GGUF Q4_K_M (5.87 bits per weight)
- Developers: Aisulu Tustykbayeva (engineering) with Ramilya Tustykbayeva, for the Safe AI Tutor for Kids project, prepared for a Stanford Accelerator for Learning submission
Training data
A purpose-built dataset of 564 instruction examples โ no child data, no scraped conversations. Each example carries an age cohort, persona variant, child archetype, turn type, a system prompt encoding the safety and pedagogy rules, a grounding context passage, and the target response.
- Age cohorts: 3โ4 (200), 5โ6 (201), 7โ8 (163), with per-cohort sentence-length caps
- Persona variants: standard (303), soft mode (75), literal mode (74), code-switch Spanish (66), code-switch Kazakh (46)
- Turn types: observation prompts (194), Socratic questions (76), multi-turn (64), safety refusals โ soft, standard and hard (96), politeness gate (48), growth-mindset closings (44), "I don't know" (42)
- 15 child archetypes (e.g. The Why Machine, The Perfectionist, The Worrier)
System context
The model is one component of a compound, harness-first system:
- On device: offline inference, zero retention by design โ audio and transcripts are processed in memory and deleted, in line with the project's COPPA and EU AI Act research.
- Deployed prototype backend (FastAPI): Microsoft Presidio PII scrubbing before inference, ChromaDB retrieval over a vetted knowledge set, a pre-flight LLM safety judge that checks the full response before it is streamed, and Prometheus observability โ safety blocks, PII detections, Socratic-response rate, reading-ease (Flesch) tracking, and RAG misses logged as a content-gap signal.
How to use
The GGUF file runs with any llama.cpp-compatible runtime, for example:
llama-cli -m pip-tutor-q4_k_m.gguf -p "You are a safe, helpful tutor for kids." -i
or by importing the model into Ollama / LM Studio as a local GGUF model. (The file inside this repository predates the product's rename from Pip to Kai; its filename was kept so existing links keep working.)
Evaluation status
No formal evaluation results are published with this model yet. An evaluation protocol is specified in the project documentation (a golden set of verified interactions scored for safety โ target 100% on refusal cases โ Socratic quality, and factual grounding), and results will be added here when the runs are complete. Do not treat this model as validated for production use with children.
Limitations and risks
- Research prototype. Not a production product and not a substitute for adult supervision. It must not be deployed for unsupervised use by children.
- A fine-tune reduces, but does not eliminate, the risk of inappropriate or incorrect outputs; the surrounding safety system described above is part of the design.
- Trained on a small, English-first dataset (564 examples); behaviour outside the covered categories and age bands is not characterised.
- The training data's system prompts name the tutor "Pip"; the product has since been renamed Kai, and runtime system prompts use the new name.
- The base model's terms (Google Gemma) apply to this derivative.
Related work by the same author
- An earlier iteration of the tutor fine-tuned Gemma 3 1B-IT with the same approach.
- Project site: https://alzion.github.io
- Downloads last month
- 2
4-bit