Instructions to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Use Docker
docker model run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Llama new
- LM Studio
- Jan
- Ollama
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Ollama:
ollama run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Unsloth Desktop
- Pi
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Docker Model Runner:
docker model run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Lemonade
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Run and chat with the model
lemonade run user.MiniCPM-OCR-1.0-AX8860-llama.cpp-BF16
List all available models
lemonade list
- Hermes Agent
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download scripts/board_stress.py from AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp: direct link, hf CLI and curl.
- Browser
- Download file 5.68 kB
-
https://huggingface.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp/resolve/main/scripts/board_stress.py
- Command line
-
hf download hf://AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp/scripts/board_stress.py
-
curl -L -o board_stress.py https://huggingface.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp/resolve/main/scripts/board_stress.py
5.68 kB
| #!/usr/bin/env python3 | |
| # random prompt-cache stress against llama-server: continue / regenerate / edit / truncate / long tool results / long replies. | |
| # Every "check" request carries a fresh code the reply must repeat, so a wrong recurrent state shows up as a wrong answer. | |
| # stress.py <port> <pkg dir> <seed> <ops> [seconds] | |
| import json, sys, time, random, urllib.request, urllib.error | |
| port, P, seed, nops = sys.argv[1], sys.argv[2], int(sys.argv[3]), int(sys.argv[4]) | |
| budget = float(sys.argv[5]) if len(sys.argv) > 5 else 1e9 | |
| rnd = random.Random(seed); T0 = time.time() | |
| TEXT = open(P + "/p4k.txt", encoding="utf-8").read() | |
| TOOLS = [{"type": "function", "function": {"name": n, "description": d, "parameters": {"type": "object", "properties": { | |
| "path": {"type": "string"}, "text": {"type": "string"}}, "required": ["path"]}}} for n, d in | |
| [("read_file", "Read a file."), ("run_shell", "Run a shell command."), ("search", "Search the code base.")]] | |
| def post(msgs, n, cache=True): | |
| body = {"messages": msgs, "max_tokens": n, "temperature": 0, "presence_penalty": 0, "top_k": 1, "seed": 1, "tools": TOOLS, "cache_prompt": cache, | |
| "chat_template_kwargs": {"enable_thinking": False}} | |
| try: | |
| r = json.load(urllib.request.urlopen(urllib.request.Request("http://127.0.0.1:%s/v1/chat/completions" % port, | |
| json.dumps(body).encode(), {"Content-Type": "application/json"}), timeout=600)) | |
| except urllib.error.HTTPError as e: | |
| return None, e.read().decode()[:160], {} | |
| except Exception as e: | |
| return None, repr(e)[:160], {} | |
| return r["choices"][0]["message"].get("content") or "", "", r.get("timings", {}) | |
| def sysmsg(k): return {"role": "system", "content": "You are a helpful assistant. Notes:\n" + TEXT[:k]} | |
| def check_msg(): | |
| code = str(rnd.randint(100000, 999999)) | |
| return {"role": "user", "content": "The code is %s. Reply with only the code." % code}, code | |
| def long_msg(): return {"role": "user", "content": "Write a long, detailed essay about %s. Do not stop early." % rnd.choice(["rivers", "trains", "tea", "bridges", "maps"])} | |
| def tool_blob(): | |
| a = rnd.randint(0, 8000); return {"role": "user", "content": "Tool output:\n" + TEXT[a:a + rnd.choice([300, 1500, 6000])]} | |
| msgs = [sysmsg(rnd.choice([400, 3000, 9000]))]; fails = wrong = done = 0; hist = []; model_wrong = [0] | |
| def ask(tag, m, code, n): | |
| global fails, wrong, done | |
| c, err, t = post(m, n); done += 1 | |
| st = "OK" | |
| if c is None: st = "FAIL " + err; fails += 1 | |
| elif code and code not in c.replace(",", "").replace(" ", ""): | |
| # Ask the same request without the prompt cache as the control. If the control fails the check as well, the | |
| # model itself is wrong; only a control that passes while the cached run fails points at the cached state. | |
| c2, _, _ = post(m, n, cache=False) | |
| ref_ok = c2 is not None and code in c2.replace(",", "").replace(" ", "") | |
| model_bad = c2 is not None and not ref_ok | |
| st = "%s got=%r want=%s nocache=%r" % ("MODEL" if model_bad else "WRONG", c[:30], code, (c2 or "")[:30]) | |
| if model_bad: model_wrong[0] += 1 | |
| else: wrong += 1 | |
| print("%3d %-10s msgs=%-3d cache_n=%-6s prompt_n=%-5s prompt_ms=%-6.0f gen_n=%-4s %s" % (done, tag, len(m), t.get("cache_n"), t.get("prompt_n"), | |
| t.get("prompt_ms", 0), t.get("predicted_n"), st), flush=True) | |
| return c | |
| last_code = None | |
| while done < nops and time.time() - T0 < budget: | |
| op = rnd.choices(["cont", "long", "regen", "edit_last", "edit_mid", "trunc", "tool", "sys", "reset"], [30, 12, 8, 10, 8, 8, 10, 3, 2])[0] | |
| if op == "cont" or len(msgs) < 2: | |
| u, code = check_msg(); msgs.append(u); c = ask("cont", msgs, code, 12) | |
| if c is None: msgs.pop(); continue | |
| msgs.append({"role": "assistant", "content": c}); last_code = code | |
| elif op == "long": | |
| msgs.append(long_msg()); c = ask("long", msgs, None, rnd.choice([120, 300, 700])) | |
| if c is None: msgs.pop(); continue | |
| msgs.append({"role": "assistant", "content": c}) | |
| elif op == "tool": | |
| msgs.append(tool_blob()); c = ask("tool", msgs, None, 20) | |
| if c is None: msgs.pop(); continue | |
| msgs.append({"role": "assistant", "content": c}) | |
| elif op == "regen" and msgs[-1]["role"] == "assistant": | |
| ask("regen", msgs[:-1], None, 12) | |
| elif op == "edit_last" and msgs[-1]["role"] == "assistant": | |
| u, code = check_msg(); msgs[-2] = u; c = ask("edit_last", msgs[:-1], code, 12) | |
| if c is not None: msgs[-1] = {"role": "assistant", "content": c} | |
| elif op == "edit_mid" and len(msgs) > 5: | |
| i = rnd.randrange(1, len(msgs) - 2) | |
| m = json.loads(json.dumps(msgs)); m[i]["content"] = m[i]["content"][:len(m[i]["content"]) // 2] + " (edited %d)" % rnd.randint(0, 99) | |
| u, code = check_msg(); m.append(u); c = ask("edit_mid", m, code, 12) | |
| if c is not None: msgs = m + [{"role": "assistant", "content": c}] | |
| elif op == "trunc" and len(msgs) > 5: | |
| k = 2 * rnd.randint(1, (len(msgs) - 3) // 2); msgs = msgs[:-k] | |
| u, code = check_msg(); msgs.append(u); c = ask("trunc", msgs, code, 12) | |
| if c is None: msgs.pop(); continue | |
| msgs.append({"role": "assistant", "content": c}) | |
| elif op == "sys": | |
| msgs[0] = sysmsg(rnd.choice([400, 3000, 9000])); u, code = check_msg(); msgs.append(u); c = ask("sys", msgs, code, 12) | |
| if c is None: msgs.pop(); continue | |
| msgs.append({"role": "assistant", "content": c}) | |
| elif op == "reset": | |
| msgs = [sysmsg(rnd.choice([400, 3000, 9000]))] | |
| print("STRESS seed=%d requests=%d fail=%d wrong=%d model_wrong=%d" % (seed, done, fails, wrong, model_wrong[0])) | |