minicpm5-deploy-litert
यह क्या करती है
यह स्किल आपके AI को Google के LiteRT-LM रनटाइम से किसी डिवाइस पर MiniCPM5 मॉडल चलाने का मार्गदर्शन देती है। यह उन लोगों के लिए है जो लैपटॉप, डेस्कटॉप या फ़ोन पर चलने वाला छोटा AI मॉडल चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप MiniCPM5 मॉडल अपने कंप्यूटर या Android फ़ोन पर चलाना चाहते हैं।
- ✓जब आपके पास .litertlm फ़ाइल है और उसे command line या लोकल server से चलाना है।
- ✓जब आप चाहते हैं कि वही मॉडल फ़ाइल फ़ोन और डेस्कटॉप दोनों पर काम करे।
Skill का लिंक
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-litert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“LiteRT-LM से MiniCPM5 मॉडल मेरे लैपटॉप पर चलाने में मदद कीजिए, और जाँचिए कि वह एक सरल सवाल का जवाब देता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल litert-lm command line टूल इंस्टॉल करती है, मॉडल फ़ाइल डाउनलोड करती है, एक परीक्षण सवाल चलाती है, और OpenAI शैली के अनुरोध स्वीकार करने वाला लोकल server शुरू कर सकती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Deploy MiniCPM5-2B / MiniCPM5-1B with LiteRT-LM (Android / iOS / desktop / IoT)
LiteRT-LM, Google's on-device runtime built on LiteRT (formerly TensorFlow Lite). One .litertlm bundle, CPU or GPU, through a CLI, an OpenAI-compatible server, Python, Kotlin and Swift. The bundles are hosted in litert-community. Human-readable reference: docs/deployment/litert.md.
Required input
| Var | Example | Default |
|---|---|---|
LITERT_REPO |
litert-community/MiniCPM5-2B or litert-community/MiniCPM5-1B |
litert-community/MiniCPM5-2B |
FILE |
MiniCPM5-2B_int4.litertlm (1.55 GB, the phone file) or MiniCPM5-2B_int8.litertlm (2.60 GB, reasoning that has to finish); 1B: minicpm_wi4b32_wi8_afp32.litertlm (CPU) or minicpm_wi4b32_wi8_afp32_gpu_opt.litertlm (GPU) |
MiniCPM5-2B_int4.litertlm |
BACKEND |
cpu or gpu |
cpu |
THINKING |
true (reason first) or false (direct answer) |
false |
PROMPT |
1+1=? |
1+1=? |
Steps
1. Install (once)
uv tool install litert-lm
2A. Run a pre-converted bundle (desktop CLI)
litert-lm run --from-huggingface-repo="${LITERT_REPO}" "${FILE}" \
--backend "${BACKEND}" --thinking "${THINKING:-false}" --prompt "${PROMPT}"
The first run downloads the file into ~/.litert-lm/cache/huggingface/<repo>/; later runs skip the download. With thinking on, the reasoning prints between [thought] and [/thought] and the answer follows; --thinking-budget 2048 caps the reasoning (4096 for math); THINKING=true makes the model reason first. Sampling as OpenBMB recommends: --top-k 40 --top-p 0.95 --temperature 1.0 (the CLI's default top-k is 1 = greedy, so temperature alone changes nothing).
2B. Android
- No code: the AI Edge Gallery app, Model manager → + → Import from HF → paste the file's Hugging Face link.
- Your own app:
implementation("com.google.ai.edge.litertlm:litertlm-android:0.17.0")from Google Maven, thelibOpenCL.so<uses-native-library>entries in the manifest for the GPU, then:
val engine = Engine(EngineConfig(modelPath = path, backend = Backend.GPU(), cacheDir = context.cacheDir.absolutePath))
engine.initialize()
engine.createConversation(ConversationConfig(maxOutputToken = 1024)).use { conversation ->
val reply = conversation.sendMessage("1+1=?")
println(reply); println(reply.channels["thought"])
}
ConversationConfig(thinkingConfig = ThinkingConfig(enableThinking = false)) turns thinking off. Full snippet, manifest and the Galaxy S26 check: the cookbook.
2C. OpenAI-compatible server (desktop)
litert-lm import --from-huggingface-repo="${LITERT_REPO}" "${FILE}" minicpm5-2b
litert-lm serve --host 127.0.0.1 --port 9379
curl http://127.0.0.1:9379/v1/chat/completions -H "Content-Type: application/json" \
-d '{"model": "minicpm5-2b", "messages": [{"role": "user", "content": "1+1=?"}], "reasoning_effort": "none"}'
reasoning_effort none = direct answer, any other value = thinking on; the cap field is max_completion_tokens; top_k is accepted alongside temperature / top_p / seed; "stream": true streams (server guide).
3. Validate
The reply contains 2 for 1+1=?: with --thinking false it is the whole reply; with thinking on it follows [/thought]. Through the server (2C), the same check is HTTP 200 with choices[0].message.content containing 2, and GET /v1/models lists minicpm5-2b.
Common pitfalls
- Thinking on the int4 file runs long chains: pass
--thinking falsefor direct answers, or use the int8 file when the reasoning has to complete. - int8 on iOS needs the increased-memory-limit entitlement (2.33 GB weight section; the default entitlements do not map it). int4's 1.28 GB main section is under the limit (checked on iPhone 17 Pro, GPU and CPU).
- First run per backend is slow: an XNNPACK weight cache is written beside the file on the CPU, kernels are compiled on the GPU (
--cache noto skip the disk cache). - Android GPU without the manifest entries:
initialize()succeeds, the first message fails withCan not find OpenCL library on this device. - Temperature without top-k does nothing: pass `--t
अक्सर पूछे जाने वाले सवाल
कौन सी मॉडल फ़ाइलें उपलब्ध हैं?
स्किल MiniCPM5-2B और MiniCPM5-1B का नाम लेती है, कई फ़ाइल प्रकारों के साथ, जैसे फ़ोन के लिए छोटी और लंबे तर्क के लिए बड़ी।
क्या मैं graphics card इस्तेमाल कर सकता हूँ?
हाँ। स्किल आपको CPU या GPU backend चुनने देती है।
क्या यह Android पर चल सकती है?
हाँ। स्किल Kotlin API और Android के लिए AI Edge Gallery ऐप कवर करती है।
जानकारी
लेखक का मूल विवरण
Run MiniCPM5-2B or MiniCPM5-1B on-device with Google's LiteRT-LM runtime — the litert-lm CLI or its OpenAI-compatible server on a desktop, the Kotlin API or the AI Edge Gallery app on Android, the same .litertlm bundle on CPU or GPU. Use when the user says "LiteRT", "LiteRT-LM", "litertlm", ".litertlm", "Android", "Edge Gallery", "on-device app", or wants one bundle for phones and desktops.
repo: OpenBMB/MiniCPM
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11530
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 21/9/2026
कमेंट
- …
इस repository की और skills
minicpm5-deploy-llama-cpp
12kआपके एजेंट को दिखाती है कि llama.cpp से CPU या घरेलू graphics card पर MiniCPM5 मॉडल कैसे चलाएँ, तैयार GGUF फ़ाइलों के साथ।
minicpm5-deploy-lmstudio
12kआपके एजेंट को LM Studio में MiniCPM5 मॉडल चलाने में मदद करती है, जो चैट विंडो वाला डेस्कटॉप ऐप है, और उसका लोकल OpenAI शैली का server शुरू करती है।
minicpm5-deploy-mlx
12kआपके एजेंट को Apple के MLX फ़्रेमवर्क से Apple Silicon Mac पर MiniCPM5 मॉडल सीधे चलाने देती है, तेज़ लोकल चैट और टेक्स्ट जनरेशन के लिए।
minicpm5-deploy-ollama
12kआपके एजेंट को Mac या Linux लैपटॉप पर Ollama से MiniCPM5 चलाना सिखाती है, एक GGUF फ़ाइल और कुछ सरल कमांड के साथ।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।