Text / Intermediate

Run local text completion with MiniCPM5 2B Base

Serve MiniCPM5 2B Base locally with llama.cpp on Windows, macOS, or Linux, then send a short chat-completion request to inspect generated text in the model's response.

EstimatedSource checked 9/25/2026
LOCALRENTED GPU

Before you begin

Difficulty
Intermediate
Software
llama.cpp (with llama-server), curl, MiniCPM5 2B Base F16 GGUF weights
Hardware
This setup uses llama.cpp. The exact checkpoint format, context, and runtime overhead determine its memory need; a weight-file size alone is not a GPU recommendation.
TEXT / LLAMA.CPPSOURCE-LINKED SETUP

Run local text completion with MiniCPM5 2B Base, step by step.

Serve MiniCPM5 2B Base locally with llama.cpp on Windows, macOS, or Linux, then send a short chat-completion request to inspect generated text in the model's response.

Choose a package Run its commands Check the result
01
BEFORE YOU BEGIN

The documented package

This setup uses the package documented for this task. Review its source and supported platforms before starting.

The publisher has not provided a complete memory target for this task. Check its hardware guidance before starting.

CURRENT SETUP

MiniCPM5 2B Base · official

This setup uses llama.cpp. The exact checkpoint format, context, and runtime overhead determine its memory need; a weight-file size alone is not a GPU recommendation.

View weight source
02
THE WORKFLOW

Set up MiniCPM5 2B Base on your machine

Pick your operating system. Every command below is for the selected package and runtime.

01

Install and prepare the runtime

Install or build the llama.cpp runtime so that the llama-server executable is available on your PATH. The model runs on Windows, macOS, and Linux. If you build from source, use your llama.cpp build workflow; the published documented invocation requires only llama-server and the model weights.

02

Place the MiniCPM5-2B F16 GGUF file

Download MiniCPM5-2B-F16.gguf from openbmb/MiniCPM5-2B-Base, or use the F16 GGUF file already provided in your local release, and place it in a directory from which you can run the server. The command below expects the file name MiniCPM5-2B-F16.gguf to be resolvable from the current working directory.

03

Start the llama.cpp server

This launches the server on port 8080, with alias MiniCPM5-2B, loading MiniCPM5-2B-F16.gguf, offloading 99 layers to the GPU if present, using an 8192-token context, and enabling the Jinja chat template. Run it from the directory containing the model file.

llama-server -m MiniCPM5-2B-F16.gguf -a MiniCPM5-2B --port 8080 -ngl 99 -c 8192 --jinja
04

Send a text completion request

With the server listening on localhost:8080, send an OpenAI-compatible chat-completion request for MiniCPM5-2B. The request uses the recommended sampling settings temperature=1.0, top_p=0.95, min_p=0.0 and a 256-token generation limit.

curl http://localhost:8080/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "MiniCPM5-2B", "messages": [{"role": "user", "content": "1+1=?"}], "temperature": 1.0, "top_p": 0.95, "min_p": 0.0, "max_tokens": 256 }'
05

Inspect the generated text

In the JSON response returned by the server, examine choices[0].message.content. For the prompt "1+1=?" you should see a short generated answer, for example text stating that 2 is the result of the addition. This confirms the model loaded and completed the prompt; a service-only check that does not inspect choices[0].message.content does not verify model output.

03
SUCCESS CHECK · MiniCPM5 2B Base

Check the completed prompt

Give the base model a short prompt and inspect the generated continuation. A base checkpoint is not assumed to follow chat instructions.

This is a source-linked setup, not a YouRunAI hardware test. Confirm your exact runtime version, package, and output before relying on it.

Back to setup steps

When it doesn’t go to plan

Repetitive or looped output from MiniCPM5-2B

Keep min_p at 0.0 as shown, or set repetition_penalty to 1.05, following the documented sampling guidance. The published recommendation is temperature=1.0, top_p=0.95, min_p=0.0, and for repetitive outputs add repetition_penalty=1.05.

The model file cannot be found when llama-server starts

Ensure MiniCPM5-2B-F16.gguf is in the directory from which you run llama-server, or run the command from the directory where the file was downloaded, and confirm the file name matches exactly.

Longer prompts are truncated or generation stops early

Increase the context value. The documented command uses -c 8192 and states you can adjust this value as needed.

REFERENCE LIBRARY

Sources and files

Original instructions, model files, and compatibility notes behind this setup.

2 SOURCES

The model behind this workflow

MiniCPM5 2B Base
MY HARDWARE

Will it run on your machine?

Save your machine to see a personalized rating and its reasoning.

Add my hardware

Keep exploring