Easy to use single-file executable to run LLMs locally on your machine
- Download the right Light AI server for your operating system.
- Run
./light-ai(./light-ai.exefor Windows) from the command line. - Open Swagger (
http://0.0.0.0:8000/swagger) and pickidof one of the available models:GET /v1/models. - Restart the server with the model
idin params (For example:./light-ai -m llama3.2-1b-instruct).
That's it! Your personal AI server is ready for usage. Try POST /v1/ask and POST /v1/completion to check.
| MacOS Silicon | light-ai |
| MacOS Intel | light-ai |
| Linux | light-ai |
| Windows | light-ai.exe |
./light-ai -p 8000 -m llama3.2-1b-instruct| Argument | Explanation |
|---|---|
-p, --port |
Port to listen on (Optional) |
-m, --model |
Model name (Optional) |
Options:
prompt: Provide the prompt to get a reply (Required)
model: Model name (Optional)
grammar: Set grammar for grammar-based sampling (Optional)
schema: JSON response with a schema (Optional)
For Example:
curl http://0.0.0.0:8000/v1/ask --header 'Content-Type: application/json' --data '{"prompt": "Is an apple more expensive than a banana?"}'Options:
prompt: Provide the prompt for this completion as a string (Required)
model: Model name (Optional)
For Example:
curl http://0.0.0.0:8000/v1/completion --header 'Content-Type: application/json' --data '{"prompt": "Here is a list of sweet fruits:"}'Options:
model: Model name (Required)
- Bun: oven-sh/bun
- node-llama-cpp: withcatai/node-llama-cpp
