Match the established LLM model card format
Browse files12345678910111213141516171819202122232425262728293031323334---license: apache-2.0base_model: openbmb/MiniCPM5-2Blibrary_name: executorchpipeline_tag: text-generationtags:- react-native-executorch- xnnpack- mlx- quantized---# MiniCPM5-2B for React Native ExecuTorchExports of the final post-trained [MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B)checkpoint (`f97400052a43d642bbc6e9975e2397e3ae6a6b52`) for React Native ExecuTorch 0.11.0.| Backend | File | Quantization || --- | --- | --- || XNNPACK | `xnnpack/minicpm_5_2b_xnnpack_8da4w.pte` | int8 dynamic activations, int4 weights || MLX | `mlx/minicpm_5_2b_mlx_4w.pte` | int4 weights |Both exports support an 8,192-token context and dynamic prefill of 1–128 tokens.Weights and embeddings use group size 64; logits are float32. MLX requires Apple silicon.Use the included `tokenizer.json` and `tokenizer_config.json`. The tokenizer preservesupstream token IDs while combining its regex splits for the native tokenizer. The chattemplate selects the upstream non-thinking prefix and includes BOS.Recommended sampling: temperature 1.0, top-p 0.95, min-p 0.0.Validated on an M1 Pro Mac: source conversion and quantized-reference logits,greedy chat, Chinese, multilingual copying, two-turn recall, cache rollback,and full 8K prefill with final-chunk rewind. Quantized logits are approximate.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657---license: apache-2.0base_model: openbmb/MiniCPM5-2Bpipeline_tag: text-generationtags:- executorchlibrary_name: executorch---# minicpm-5This repository hosts the **MiniCPM5-2B** model exported for the[React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch)library as ExecuTorch `.pte` programs, ready to run on device.Source: [openbmb/MiniCPM5-2B](https://huggingface.co/openbmb/MiniCPM5-2B),revision `f97400052a43d642bbc6e9975e2397e3ae6a6b52` (final post-trained checkpoint).## Variants| Path | Backend | Precision | Context length || --- | --- | --- | --- || `mlx/minicpm_5_2b_mlx_4w.pte` | mlx | int4 | 8,192 || `xnnpack/minicpm_5_2b_xnnpack_8da4w.pte` | xnnpack | 8da4w | 8,192 |## Repository structure```mlx/config.json 1.3 KiBmlx/minicpm_5_2b_mlx_4w.pte 1.3 GiBtokenizer.json 5.0 MiBtokenizer_config.json 97.5 KiBxnnpack/config.json 1.3 KiBxnnpack/minicpm_5_2b_xnnpack_8da4w.pte 1.3 GiB```## Export notesBoth variants support prefill chunks of 1–128 tokens and float32 logits.Use the included tokenizer files; the chat template selects non-thinking generation.Both backends were tested on an Apple M1 Pro, including generation, cache rollback,and full 8K prefill. Quantized logits are approximate.## CompatibilityThese files are published for the **ExecuTorch v1.4.1** runtime. ExecuTorchgives no forward compatibility guarantee, so an older runtime may fail to loadthem. MLX requires physical Apple silicon hardware; XNNPACK runs on CPU.To use them in React Native ExecuTorch **v0.11.0**, pass`models.llm.MINICPM5_2B.XNNPACK_8DA4W` or `models.llm.MINICPM5_2B.MLX_INT4`to the LLM chat session. See the[documentation](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models).To load these files in your own ExecuTorch runtime, read the[compatibility note](https://github.com/pytorch/executorch/blob/main/runtime/COMPATIBILITY.md)first.
README.md+44-21