Clean up

#8
by hvt4 - opened
README.md CHANGED
@@ -24,24 +24,23 @@ This repository hosts the [**LiteRT-LM**](https://ai.google.dev/edge/litert-lm)
24
 
25
  ## Available Models
26
 
27
- * **`minicpm_dynamic_wi8_afp32_gpu_opt.litertlm`**: This model features dynamic weight-only INT8 quantization (wi8) with FP32 activations (afp32), heavily optimized for GPU execution.
28
  * **`minicpm_wi4b32_wi8_afp32.litertlm`**: This model features mixed INT4-block32(linear)/INT8(embed and lmhead) quantization (wi4b32_wi8) with FP32 activations (afp32).
29
  * **`MiniCPM5-1B_dynamic_wi8_afp32.litertlm`**: This model features dynamic weight-only INT8 quantization (wi8) with FP32 activations (afp32). It is configured with static prefill memory allocation.
30
 
31
  ## Quantization Benchmark
32
 
33
- The table below compares the accuracy of the FP baseline and the two LiteRT-LM quantized models on the same evaluation benchmark. Scores are reported as percentages.
34
 
35
- | Category | FP (bf16) | W8 | W4 |
36
- | --- | --- | --- | --- |
37
- | Overall | 66.16 | 63.78 | 60.91 |
38
- | STEM | 58.07 | 56.35 | 53.36 |
39
- | Social Science | 77.91 | 73.65 | 70.87 |
40
- | Humanities | 67.65 | 66.68 | 64.35 |
41
- | Other | 68.71 | 65.40 | 62.14 |
42
- | Hard | 47.08 | 43.79 | 44.23 |
43
 
44
- FP (bf16) is the full-precision baseline. W8 uses dynamic weight-only INT8 quantization (`wi8`) with FP32 activations (`afp32`). W4 uses mixed INT4-block32 (linear) / INT8 (embed and lmhead) quantization (`wi4b32_wi8`) with FP32 activations (`afp32`). Thinking mode has been turned off to reduce context usage. All evaluations use a temperature of 0.6, top-p of 0.95, and a random seed of 0.
45
 
46
  ## What is MiniCPM?
47
 
@@ -75,7 +74,7 @@ FP (bf16) is the full-precision baseline. W8 uses dynamic weight-only INT8 quant
75
  1. **Get the App**: Install the [app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pli=1) from Google Play or download the latest APK from the [GitHub releases page](https://github.com/google-ai-edge/gallery/releases).
76
  2. **Importing the Model**: Navigate to the **Model manager** within the app and click the **"+" (plus)** icon in the bottom-right corner. Two options will appear:
77
  * **Import from HF (Recommended)**: Select this option, and a dialog box will appear showing an example Hugging Face model URL. Enter the HF link for the desired `.litertlm` model and click submit. The model will then appear in your list, and you can proceed to download it (a Hugging Face account login is required).
78
- * **From local model file**: First, download the `.litertlm` model directly to your Android device, OR download it to your computer and push it via ADB (e.g., `adb push minicpm_dynamic_wi8_afp32_gpu_opt.litertlm /sdcard/Download/`). Then, select this option, choose the downloaded file from your storage, configure your preferred parameters, and tap **"Import"**.
79
 
80
  For full details on importing models and other features, see the [Edge Gallery App Wiki](https://github.com/google-ai-edge/gallery/wiki).
81
 
@@ -87,7 +86,7 @@ Install `uv` and run the model directly from the LiteRT-LM command line:
87
 
88
  ```bash
89
  uv tool install litert-lm
90
- uvx litert-lm run --from-huggingface-repo=litert-community/MiniCPM5-1B minicpm_dynamic_wi8_afp32_gpu_opt.litertlm --prompt="What is the capital of France?"
91
  ```
92
 
93
  ## Links
 
24
 
25
  ## Available Models
26
 
 
27
  * **`minicpm_wi4b32_wi8_afp32.litertlm`**: This model features mixed INT4-block32(linear)/INT8(embed and lmhead) quantization (wi4b32_wi8) with FP32 activations (afp32).
28
  * **`MiniCPM5-1B_dynamic_wi8_afp32.litertlm`**: This model features dynamic weight-only INT8 quantization (wi8) with FP32 activations (afp32). It is configured with static prefill memory allocation.
29
 
30
  ## Quantization Benchmark
31
 
32
+ The table below compares the accuracy of the FP baseline and the LiteRT-LM quantized model on the same evaluation benchmark. Scores are reported as percentages.
33
 
34
+ | Category | FP (bf16) | W4 |
35
+ | --- | --- | --- |
36
+ | Overall | 66.16 | 60.91 |
37
+ | STEM | 58.07 | 53.36 |
38
+ | Social Science | 77.91 | 70.87 |
39
+ | Humanities | 67.65 | 64.35 |
40
+ | Other | 68.71 | 62.14 |
41
+ | Hard | 47.08 | 44.23 |
42
 
43
+ FP (bf16) is the full-precision baseline. W4 uses mixed INT4-block32 (linear) / INT8 (embed and lmhead) quantization (`wi4b32_wi8`) with FP32 activations (`afp32`). Thinking mode has been turned off to reduce context usage. All evaluations use a temperature of 0.6, top-p of 0.95, and a random seed of 0.
44
 
45
  ## What is MiniCPM?
46
 
 
74
  1. **Get the App**: Install the [app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pli=1) from Google Play or download the latest APK from the [GitHub releases page](https://github.com/google-ai-edge/gallery/releases).
75
  2. **Importing the Model**: Navigate to the **Model manager** within the app and click the **"+" (plus)** icon in the bottom-right corner. Two options will appear:
76
  * **Import from HF (Recommended)**: Select this option, and a dialog box will appear showing an example Hugging Face model URL. Enter the HF link for the desired `.litertlm` model and click submit. The model will then appear in your list, and you can proceed to download it (a Hugging Face account login is required).
77
+ * **From local model file**: First, download the `.litertlm` model directly to your Android device, OR download it to your computer and push it via ADB (e.g., `adb push MiniCPM5-1B_dynamic_wi8_afp32.litertlm /sdcard/Download/`). Then, select this option, choose the downloaded file from your storage, configure your preferred parameters, and tap **"Import"**.
78
 
79
  For full details on importing models and other features, see the [Edge Gallery App Wiki](https://github.com/google-ai-edge/gallery/wiki).
80
 
 
86
 
87
  ```bash
88
  uv tool install litert-lm
89
+ uvx litert-lm run --from-huggingface-repo=litert-community/MiniCPM5-1B MiniCPM5-1B_dynamic_wi8_afp32.litertlm --prompt="What is the capital of France?"
90
  ```
91
 
92
  ## Links
minicpm_dynamic_wi8_afp32_gpu_opt.litertlm DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ca61f7ccf2d34619f16f68155367e42ba5f38b29cd4c0e89b5548d35461308c4
3
- size 1098475296