niuchl commited on
Commit
1ab5b90
·
verified ·
1 Parent(s): 680d2a8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -22
README.md CHANGED
@@ -8,41 +8,51 @@ base_model:
8
 
9
  # litert-community/DeepSeek-R1-Distill-Qwen-1.5B
10
 
11
- This model was converted to LiteRT (aka TFLite) format from [deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) using [Google AI Edge Torch](https://github.com/google-ai-edge/ai-edge-torch).
12
 
13
- ## Run the model in colab
14
 
15
- *Disclaimer: Model performance demonstrated with the Python API in this notebook is not representative of performance on a local device.*
 
 
16
 
17
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/#fileId=https://huggingface.co/litert-community/DeepSeek-R1-Distill-Qwen-1.5B/blob/main/deepseek%20tflite.ipynb)
18
 
19
- ## Run the model on Android
 
 
20
 
21
- Please follow the [instructions](https://github.com/google-ai-edge/mediapipe-samples/blob/main/examples/llm_inference/android/README.md).
22
 
23
- ## Benchmarking results
24
 
25
- Note that all benchmark stats are from a Samsung S24 Ultra.
26
 
27
  <table border="1">
28
  <tr>
29
- <th>Model</th>
30
- <td colspan="2">DeepSeek-R1-Distill-Qwen-1.5B (Int8 quantized)</td>
31
- </tr>
32
- <tr>
33
- <th>Params</th>
34
- <td colspan="2">1.78 B</td>
35
- </tr>
36
- <tr>
37
- <th></th>
38
- <td><b>Prefill 512 tokens</b></td><td><b>Decode 128 tokens</b></td>
39
  </tr>
40
  <tr>
41
- <th>LiteRT tk/s (XNNPACK, 4 threads)</th>
42
- <td>260.95</td><td>23.126</td>
 
 
 
 
 
43
  </tr>
44
  <tr>
45
- <th>GGML tk/s (CPU, 4 threads)</th>
46
- <td>64.66</td><td>23.85</td>
 
 
 
 
47
  </tr>
48
- </table>
 
8
 
9
  # litert-community/DeepSeek-R1-Distill-Qwen-1.5B
10
 
11
+ This model provides a few variants of [deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B) that are ready for deployment on Android using the [LiteRT (fka TFLite) stack](https://ai.google.dev/edge/litert) and [MediaPipe LLM Inference API](https://ai.google.dev/edge/mediapipe/solutions/genai/llm_inference).
12
 
13
+ ## Use the models
14
 
15
+ ### Colab
16
+
17
+ *Disclaimer: The target deployment surface for the LiteRT models is Android/iOS/Web and the stack has been optimized for performance on these targets. Trying out the system in Colab is an easier way to familiarize yourself with the LiteRT stack, with the caveat that the performance (memory and latency) on Colab could be much worse than on a local device.*
18
 
19
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/#fileId=https://huggingface.co/litert-community/DeepSeek-R1-Distill-Qwen-1.5B/blob/main/deepseek%20tflite.ipynb)
20
 
21
+ ### Android
22
+
23
+ To build the demo app from source, please follow the [instructions](https://github.com/google-ai-edge/mediapipe-samples/blob/main/examples/llm_inference/android/README.md) from the GitHub repository.
24
 
25
+ ## Performance
26
 
27
+ ### Android
28
 
29
+ Note that all benchmark stats are from a Samsung S24 Ultra with 1280 KV cache size, 65 tokens prefill, 128 tokens decode.
30
 
31
  <table border="1">
32
  <tr>
33
+ <th></th>
34
+ <th>Backend</th>
35
+ <th>Prefill (tokens/sec)</th>
36
+ <th>Decode (tokens/sec)</th>
37
+ <th>Time-to-first-token (sec)</th>
38
+ <th>Memory (RSS in MB)</th>
39
+ <th>Model size (MB)</th>
 
 
 
40
  </tr>
41
  <tr>
42
+ <td>fp32 (baseline)</td>
43
+ <td rowspan="2">CPU</td>
44
+ <td><p style="text-align: right">45</p></td>
45
+ <td><p style="text-align: right">6</p></td>
46
+ <td><p style="text-align: right">1.58</p></td>
47
+ <td><p style="text-align: right">6,144</p></td>
48
+ <td><p style="text-align: right">7,124</p></td>
49
  </tr>
50
  <tr>
51
+ <td>dynamic_int8</td>
52
+ <td><p style="text-align: right">271</p></td>
53
+ <td><p style="text-align: right">23</p></td>
54
+ <td><p style="text-align: right">0.54 </p></td>
55
+ <td><p style="text-align: right">1,869 </p></td>
56
+ <td><p style="text-align: right">1,861</p></td>
57
  </tr>
58
+ </table>