apps/mnncli/README.md
Note: This project is under active development and may contain bugs or unfinished features. Use with caution.
MNNCLI is a command-line interface tool for MNN (Mobile Neural Network) that provides various functionalities for working with LLM models.
To build MNNCLI, run the following commands from the mnncli directory:
sh build.sh
The executable will be located at build_mnncli/mnncli.
./build_mnncli/mnncli list
./build_mnncli/mnncli serve <model_name>
Optional host/port:
./build_mnncli/mnncli serve <model_name> --host 127.0.0.1 --port 8000
./build_mnncli/mnncli run <model_name> [-c config_path] [-p prompt] [-f prompt_file]
./build_mnncli/mnncli benchmark <model_name> [-c config_path]
./build_mnncli/mnncli download <model_name> <repo_name>
./build_mnncli/mnncli search <keyword>
./build_mnncli/mnncli delete <model_name>
mnncli serve (OpenAI-compatible)Available endpoints:
GET /v1/modelsPOST /v1/chat/completionsPOST /chat/completions (alias)Minimal curl examples:
curl http://127.0.0.1:8000/v1/models
curl http://127.0.0.1:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen3.5-0.8B-MNN",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'
/v1/messages)Available endpoint:
POST /v1/messagesMinimal curl example:
curl http://127.0.0.1:8000/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: dummy" \
-d '{
"model": "Qwen3.5-0.8B-MNN",
"max_tokens": 128,
"messages": [{
"role": "user",
"content": [{"type": "text", "text": "Hello"}]
}]
}'
This route is designed for Anthropic-style clients (including Claude-compatible integrations) and supports both non-stream and stream requests.
libssl-dev (or equivalent) is installedmnncli serve currently provides OpenAI-compatible and Anthropic-compatible API routes