Fast local LLM inference on plain CPUs. No GPU, 8 GB of RAM. OpenAI-compatible server.
Python aiavx512cpu-inferenceedge-aiggufinference-enginellama-cppllmllm-inferencelocal-ailocal-llmno-gpuon-device-aiopenai-apiopenai-compatiblequantizationqwenself-hostedspeculative-decodingternary
Housekeeping: link the smoke test and deployment guide, document the tests (#136)
0xaronb29ef3239048
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 2a36a41..7fa22bc 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -9,7 +9,7 @@ jobs:steps:- uses: actions/checkout@v7- name: Shell scripts parse- run: for f in install.sh serve start scripts/package.sh scripts/verify-dispatch.sh scripts/cross-aarch64.sh patches/apply.sh docker/entrypoint.sh bench/box.sh bench/jobs.sh bench/quick.sh; do bash -n "$f"; done+ run: for f in install.sh serve start scripts/package.sh scripts/verify-dispatch.sh scripts/cross-aarch64.sh scripts/smoke-test.sh patches/apply.sh docker/entrypoint.sh bench/box.sh bench/jobs.sh bench/quick.sh; do bash -n "$f"; done- name: Python compilesrun: python3 -m py_compile scripts/graft_mtp.py bench/*.py- name: Unit testsdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 97c553a..b951758 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -14,6 +14,15 @@ Thanks for looking. This is a small project; the most useful contributions are,- `patches/` and `kernels/` are applied to a pinned commit of PrismML's llama.cpp fork by `patches/apply.sh`; change them there, not in a checkout.- Before sending a pull request, run `./install.sh` on a clean machine, then `./serve` and one request (the `curl` in the README); for anything that touches speed, `bench/README.md`.- Shell scripts must pass `bash -n`; Python must compile. CI checks both.+- Run the unit tests before sending a pull request; CI runs the same two commands. They need no model and take+ under a minute:+ ```sh+ python3 -m pip install gguf numpy # in a virtualenv; a few tests are skipped without these+ python3 -m unittest discover -s tests -p 'test_*.py'+ (cd bench && python3 -m unittest discover -s . -p 'test_*.py')+ ```+- A bug fix should come with a test that fails without the fix.+- With a server running, `bash scripts/smoke-test.sh` checks the three endpoints most clients use.- Text a user sees (README, `--help`, messages) should say what a thing does in plain words.## Numbers in the READMEdiff --git a/README.md b/README.mdindex 53e06ab..a3d98b5 100644--- a/README.md+++ b/README.md@@ -459,6 +459,9 @@ curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/jso-d '{"messages":[{"role":"user","content":"Write a haiku about cache misses."}]}'```+Or check the health endpoint, the model list and one reply in one go: `bash scripts/smoke-test.sh`.+To keep the server running in the background as a systemd service, see [docs/deployment.md](docs/deployment.md).+## In the cloud- **Any Linux VM or container host** with 8 vCPU / 8 GB: the Linux recipe or the Docker image above (AVX-512 for the