LightWeight is a private local-AI CLI for running the exact model you choose with a hardware-aware fit plan. It does not silently replace a large model with a smaller one.
The workflow is:
lightweight doctor
lightweight check qwen:32b --mode fit
lightweight pull qwen:32b --mode fit
lightweight inspect-model qwen:32b
lightweight probe qwen:32b --thermal balanced
lightweight bench qwen:32b --tokens 64 --thermal balanced
lightweight chat qwen:32b --thermal balanced- Exact-model planning:
quality,balanced,fit, andextremetune quant, context, offload, and thermals around the selected model. - Runtime inspection:
inspect-modelreads GGUF metadata before you tune runtime settings. - Local profiling:
probeandbenchmeasure memory pressure, GPU layer fit, and real tokens/sec on your machine. - Active-set planning: MoE experts, KV cache, and dense layer placement are treated separately instead of using one generic offload rule.
- Recovery path: the engine can retry with safer runtime settings when a load hits memory limits.
- Local serving:
serveopens the browser chat UI and exposes an OpenAI-compatible/v1API.
irm https://lightweight.zecoryx.uz/install.ps1 | iexRelease binaries are built automatically by GitHub Actions when you push a version tag. The installer downloads the latest public GitHub Release asset:
git tag v0.1.1
git push origin v0.1.1If you install from a fork or a future private repo, set:
$env:LIGHTWEIGHT_GITHUB_REPO="owner/repo"
$env:LIGHTWEIGHT_GITHUB_TOKEN="github_pat_..." # only needed for private reposcurl -fsSL https://lightweight.zecoryx.uz/install.sh | shlightweight doctor
lightweight check llama3:70b --mode fitdoctor checks backend support, RAM, VRAM, disk, mmap/mlock, and llama-server availability. check builds a plan before you download.
lightweight pull qwen:32b --mode fitYou can use a built-in alias such as qwen:14b, qwen:32b, llama3:70b, deepseek-r1:32b, or pass an exact Hugging Face GGUF repo ID.
lightweight squeeze plan deepseek-r1:14b --target-ram 8gb --target-vram 6gb
lightweight squeeze build deepseek-r1:14b --profile auto --target-ram 8gb --target-vram 6gb
lightweight squeeze verify deepseek-r1:14b
lightweight squeeze report deepseek-r1:14b
lightweight squeeze profiles deepseek-r1:14b
lightweight squeeze use deepseek-r1:14b balancedsqueeze plan compares quality, balanced, fit, and extreme profiles for the exact model. It shows the quant, context, active-set policy, estimated size, and whether the model is ready, tight, slow, or not recommended on the target memory budget.
squeeze build downloads the selected exact-model GGUF quant and stores the chosen squeeze profile in the local registry.
squeeze verify reads the local model metadata and prints the runtime policy that will be used before you rely on it. Use --run when you want a small local load and generation check; the result is saved back into the local registry.
squeeze report summarizes the active squeeze profile, runtime profile, metadata, and last verification result.
squeeze profiles lists saved profiles for a local model. squeeze use switches the active profile used by chat, serve, and the browser/API backend.
lightweight inspect-model qwen:32b
lightweight probe qwen:32b --thermal balanced
lightweight bench qwen:32b --tokens 64 --thermal balancedUse these before daily use so the runtime profile is based on your actual device, not a generic claim.
lightweight chat qwen:32b --thermal balancedTerminal chat supports local private inference and stop/retry behavior.
lightweight serve --backend auto --port 8000Then open http://localhost:8000 for the browser chat UI, or call:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"qwen:32b","messages":[{"role":"user","content":"Hello"}]}'If native llama-server is installed:
lightweight serve --backend llama-server --model qwen:32b --spec ngram-cacheFor MoE models, LightWeight can use llama-server expert placement when the installed binary supports it:
lightweight serve --backend llama-server --model mixtral:8x7b --moe-offload auto
lightweight serve --backend llama-server --model qwen-moe --moe-offload first-n --n-cpu-moe 18The intended memory tier is:
VRAM: shared layers, hot experts, active KV cache
RAM: cold experts, quantized model pages, older KV cache
SSD: storage/mmap and last-resort fallback, not the fast path
Advanced tensor placement can be passed through only when you know the target llama-server build supports it:
lightweight serve --backend llama-server --model qwen-moe --override-tensor "blk.*.ffn_.*=CPU"lightweight list
lightweight rm qwen:32b
lightweight storageLightWeight can reduce memory pressure with quant selection, mmap, GPU layer offload, MoE expert placement, KV cache options, prompt cache, and backend routing. It cannot make every huge dense model fast on every small laptop without tradeoffs. SSD/NVMe paging is treated as a fallback, not as a promise of interactive speed. When the model is too large, check, probe, and bench make that visible before you rely on it.
MIT © LightWeight Team