Run this model with HF Jobs

Run luispoveda93/MiniCPM5-2B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/luispoveda93/MiniCPM5-2B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/luispoveda93/MiniCPM5-2B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/luispoveda93/MiniCPM5-2B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/luispoveda93/MiniCPM5-2B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

MiniCPM5-2B (LiteRT-LM)

This repository hosts a LiteRT-LM (LiteRT, formerly TensorFlow Lite) conversion of openbmb/MiniCPM5-2B, optimized for fully on-device inference on mobile and edge hardware.

The model was re-authored with ai-edge-torch (Llama-architecture decoder, since MiniCPM5-2B ships as a standard LlamaForCausalLM), verified for numerical parity against the original HF checkpoint (cosine similarity 0.999995 on last-token logits), converted to a multi-signature (prefill_8/64/128/256/512/1024 + decode) .tflite with INT8 dynamic weight-only quantization, and packaged into .litertlm with litert-lm-builder.

Available Files

  • MiniCPM5-2B_wi8_afp32.litertlm: dynamic weight-only INT8 quantization (wi8) with FP32 activations (afp32). KV cache buffer length 1280 tokens.

Model Information

Item Value
Type Causal Language Model
Architecture Standard LlamaForCausalLM
Layers 42
Hidden size 2048
Attention Heads (GQA) 16 (Q) / 2 (KV), head_dim 128
Vocab size 130,560
Context Length (native) 131,072
Exported KV cache length 1,280

Verification

  • Numerical parity: re-authored ai-edge-torch model vs. original HF transformers forward pass β€” cosine similarity 0.999995 on last-token logits (identical top-5 token predictions).
  • End-to-end generation: verified with litert-lm run, including correct <think>...</think> reasoning-channel parsing and coherent completions (factual QA + code generation tested).

Use the model

Desktop/CLI

Install uv and run the model directly from the LiteRT-LM command line:

uv tool install litert-lm
uvx litert-lm run --from-huggingface-repo=luispoveda93/MiniCPM5-2B-litert-lm MiniCPM5-2B_wi8_afp32.litertlm --prompt="What is the capital of France?"

Edge Gallery App (Android)

  1. Install the app from Google Play or the GitHub releases page.
  2. In Model manager, tap + β†’ Import from HF, paste this repo's .litertlm URL, and download.

Links

License

Released under the Apache-2.0 License, consistent with the upstream openbmb/MiniCPM5-2B.

Citation

@article{minicpm4,
  title={MiniCPM4: Ultra-efficient LLMs on end devices},
  author={MiniCPM, Team},
  journal={arXiv preprint arXiv:2506.07900},
  year={2025}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for luispoveda93/MiniCPM5-2B

Finetuned
(95)
this model

Paper for luispoveda93/MiniCPM5-2B