liuyd-dev/tianwen-minicpm5-1b-api
0
Tianwen · MiniCPM5-1B inference (ZeroGPU)
OpenAI-compatible inference for the fine-tuned `tianwen-minicpm5-1b`, served with llama-cpp-python inside an @spaces.GPU function. Backs the Tianwen app.
Endpoints: POST /v1/chat/completions · GET /v1/models
Files this Space needs
deploy_hf_zerogpu.py(app) — copy from the main repo'sfinetune/requirements.txt(this folder)model.gguf— upload the F16tianwen-minicpm1b.ggufasmodel.gguf(1B F16 ≈ 2GB, fits ZeroGPU; no quantization needed). A quantizedQ4_K_Malso works if you have one.
The model's official chat template is embedded in the GGUF, so deploy_hf_zerogpu.py does not force a chat_format — llama-cpp-python uses the built-in template automatically.
Space variables / secrets
TIANWEN_API_KEY— the bearer key the Tianwen app sends (set the same value in the app Space'sCELESTIAL_LLM_KEY)MODEL_PATH— defaults tomodel.ggufTIANWEN_N_CTX— defaults to4096
