abdullahhsamir/kagllm
A CLI that serves GGUF models from Kaggle GPUs through an OpenAI-compatible API
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
kagllm is a Python orchestration CLI, not a local inference engine. Its entry point is kagllm.cli:main; Typer handles commands, Rich and Questionary support the terminal interface, and the manifest includes kaggle, huggingface_hub, requests, and six. Within src/kagllm/, notebook.py generates the remote workload, kaggle_ops.py and hf_ops.py handle service operations, and monitor.py handles monitoring.
The CLI submits a private Kaggle notebook, which reads service credentials from the private kagllm-secrets dataset. The standard path checks a private Hugging Face cache, falls back to a SHA-256-verified public cache, then builds llama.cpp if neither matches. The notebook runs llama-server across two T4s and exposes it through ngrok at a public HTTPS URL gated by an API key. The CLI follows the Kaggle run log for progress and GPU telemetry.
Key Capabilities & Differentiators
The standard serving path is for single-file text GGUFs; vision projectors are skipped. Around 26 GB is the practical model-file target against 30 GB of combined GPU memory, leaving space for context. The CLI browses Hugging Face artifacts by size, and --ctx pins the context size instead of using automatic sizing. Clients can use /v1/chat/completions or /v1/messages and opt into configuration for tools including Qwen Code, OpenCode, and Claude Code. Tool calling still depends on the model's chat template.
For select larger models, Strata keeps dense weights and frequently used experts on GPU and leaves the remaining experts in RAM or on disk. One concrete example is the 58.4 GB Qwen3.8 Flash-Next Coder IQ1_M at 256k context: about 30 minutes to first start, 12–18 minutes on subsequent starts using cached prepared files, and 27–34 tokens/s during generation. Those figures describe that configuration, not a general performance target.
Trade-offs & Limitations
Compared with running llama.cpp directly, kagllm removes the need for a local GPU but gives up control over scheduling, session lifetime, and network exposure. Compared with the OpenAI API, it lets you choose the GGUF artifact, but you take on model selection, startup and session management, and client compatibility checks. The two exposed protocol routes are useful integration points, not evidence of full parity with either provider API.
Kaggle's GPU allocation is about 30 hours per week, a session can last up to 12 hours, and free ngrok allows one tunnel per account. A private notebook does not make its public HTTPS endpoint private; protect the endpoint key and the service tokens kept locally and in a private Kaggle dataset. MIT covers the project code, not model permissions or Kaggle usage rights. Account profiles are for distinct users or teams, not for stacking an individual's free hours.
Hardware & Deployment Guide
Install with Python 3.11+ and uv; the checkout supports uv tool install --editable .. Run kagllm setup with a Kaggle API token, a write-enabled Hugging Face token, and an ngrok authtoken. The remote notebook needs internet access and a dual-T4 allocation. This is a cloud-backed CLI-to-API deployment, not an offline setup, and it does not require a local GPU.
Use kagllm up interactively or supply --repo, --file, and --hours. Leaving the dashboard does not stop the server; use kagllm down to end the run or cancel one awaiting a GPU. A llama.cpp cache miss can mean about 45 minutes of first-time compilation for a CUDA version. Release v0.6.0 renamed kllm to kagllm and added the Strata route for supported models beyond the standard GPU-fit path.
/v1/chat/completions and /v1/messages.--hours limits runtime, --detach exits after readiness, and reconnect recovers an existing run after the terminal closes.Learning GGUF serving, comparing quantized text models, or testing coding-agent integrations on short-lived GPU sessions without a local GPU.
You need an always-on endpoint, predictable startup, private-network isolation, offline operation, or guaranteed support for arbitrary large GGUFs.
Quick Start & Installation
git clone https://github.com/abdullahhsamir/kagllm.git cd kagllm uv tool install --editable .
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| kagllm ★ | 66 | +66 | Python | MIT | A CLI that serves GGUF models from Kaggle GPUs through an OpenAI-compatible API |
| OmniRoute | 92.2k | +1.4k | TypeScript | MIT | Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback |
| freellmapi | 62.1k | +2.7k | TypeScript | MIT | Self-hosted LLM gateway for routing across free tiers and custom endpoints |
| bifrost | 10.2k | +125 | Go | Apache-2.0 | Self-hosted Go gateway for routing and governing multi-provider LLM traffic |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/abdullahhsamir/kagllm.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about kagllm
Where does inference run, and how do existing clients connect?
/v1 and supply the model name and key. Anthropic-style clients can use /v1/messages; for coding agents, choose an instruct model with a tool-calling chat template.How should I size a model for the dual-T4 runtime?
Does the MIT license make this suitable for commercial or private hosting?
When should I choose kagllm over direct llama.cpp or the OpenAI API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy