psiddh commited on
Commit
2764d1a
·
verified ·
1 Parent(s): ffd4180

Add ExecuTorch WebGPU program for smolvlm-500m-instruct

Browse files
Files changed (1) hide show
  1. README.md +52 -6
README.md CHANGED
@@ -5,6 +5,7 @@ base_model:
5
  base_model_relation: quantized
6
  library_name: executorch
7
  pipeline_tag: image-text-to-text
 
8
  tags:
9
  - executorch
10
  - webgpu
@@ -15,14 +16,43 @@ tags:
15
 
16
  This repository contains an [ExecuTorch](https://github.com/pytorch/executorch) conversion of
17
  [HuggingFaceTB/SmolVLM-500M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct) for the ExecuTorch **WebGPU** backend, so the model runs entirely in a web browser on
18
- the visitor's GPU. It powers the corresponding demo in the
19
- ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)).
20
 
21
  - **Base model:** [HuggingFaceTB/SmolVLM-500M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct)
22
  - **Format:** ExecuTorch `.pte` programs delegated to the WebGPU backend
23
  - **Quantization:** int8 vision encoder and token embeddings; decoder as exported
24
  - **Total size:** 893.9 MB
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ## Files
27
 
28
  | File | Size | SHA-256 |
@@ -41,16 +71,32 @@ Full checksums are in `manifest.json`. The playground verifies them after downlo
41
 
42
  ## Running it
43
 
44
- These programs need the ExecuTorch WebGPU runtime compiled to WebAssembly
45
- ([backends/webgpu](https://github.com/pytorch/executorch/tree/main/backends/webgpu)). The easiest way to
46
- try the model is the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)),
47
- which downloads these files once, caches them in the browser, and runs everything locally.
 
 
 
48
 
49
  ## Provenance
50
 
51
  - Converted from the upstream checkpoint by the ExecuTorch team with the WebGPU export path.
52
  - A reproducible export recipe will be published alongside the open-source ExecuTorch WebGPU runtime.
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ## License
55
 
56
  This is a derivative of the upstream model and is distributed under the same terms
 
5
  base_model_relation: quantized
6
  library_name: executorch
7
  pipeline_tag: image-text-to-text
8
+ inference: false
9
  tags:
10
  - executorch
11
  - webgpu
 
16
 
17
  This repository contains an [ExecuTorch](https://github.com/pytorch/executorch) conversion of
18
  [HuggingFaceTB/SmolVLM-500M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct) for the ExecuTorch **WebGPU** backend, so the model runs entirely in a web browser on
19
+ the visitor's GPU. It powers the corresponding demo in the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)).
 
20
 
21
  - **Base model:** [HuggingFaceTB/SmolVLM-500M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct)
22
  - **Format:** ExecuTorch `.pte` programs delegated to the WebGPU backend
23
  - **Quantization:** int8 vision encoder and token embeddings; decoder as exported
24
  - **Total size:** 893.9 MB
25
 
26
+ ## About the original model
27
+
28
+ A compact vision-language model that answers questions about images, describes them and transcribes text in them. It pairs a 93M SigLIP vision encoder with the SmolLM2-360M language model.
29
+
30
+ - **Developed by:** Hugging Face
31
+ - **Paper:** [SmolVLM: Redefining small and efficient multimodal models](https://arxiv.org/abs/2504.05299)
32
+ - 507M parameters
33
+ - English
34
+ - Based on the Idefics3 architecture
35
+
36
+ For training data, evaluation results and full details, see the original model card: [HuggingFaceTB/SmolVLM-500M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-500M-Instruct).
37
+
38
+ ## Intended use and limitations
39
+
40
+ Image description, visual question answering and reading text in images.
41
+
42
+ Not for high-stakes decisions about people (for example identity, employment or credit). It can describe images inaccurately or invent details; see the misuse and out-of-scope section of the upstream card.
43
+
44
+ ## What changed in this conversion
45
+
46
+ - Vision encoder and token embeddings quantized to int8
47
+ - Vision encoder, prefill and decoder exported as separate programs
48
+ - Context capped at 512 tokens
49
+
50
+ ## Inputs and outputs
51
+
52
+ - `vlm_vision_q8.pte`: one image to visual tokens
53
+ - `vlm_prefill.pte` and `vlm_decoder.pte`: prompt prefill, then token-by-token decoding; embeddings come from `embed_tokens.i8.bin` with `embed_tokens.scale.f32.bin`
54
+ - Tokenize with the files in `tokenizer/`; `vlm_meta.json` lists the special tokens and sizes
55
+
56
  ## Files
57
 
58
  | File | Size | SHA-256 |
 
71
 
72
  ## Running it
73
 
74
+ These programs were exported with the ExecuTorch WebGPU backend
75
+ ([backends/webgpu](https://github.com/pytorch/executorch/tree/main/backends/webgpu)) and validated with the
76
+ WebAssembly runtime build used by the ExecuTorch WebGPU Playground (launching soon on [executorch.ai](https://executorch.ai)). That runtime build is not published yet; until it is,
77
+ the playground is the supported way to run them. It downloads these files once, caches them in the browser,
78
+ and runs everything locally.
79
+
80
+ Requirements: a browser with WebGPU enabled.
81
 
82
  ## Provenance
83
 
84
  - Converted from the upstream checkpoint by the ExecuTorch team with the WebGPU export path.
85
  - A reproducible export recipe will be published alongside the open-source ExecuTorch WebGPU runtime.
86
 
87
+ ## Citation
88
+
89
+ If you use this model, please cite the original work:
90
+
91
+ ```bibtex
92
+ @article{marafioti2025smolvlm,
93
+ title={SmolVLM: Redefining small and efficient multimodal models},
94
+ author={Andrés Marafioti and Orr Zohar and Miquel Farré and Merve Noyan and Elie Bakouch and Pedro Cuenca and Cyril Zakka and Loubna Ben Allal and Anton Lozhkov and Nouamane Tazi and Vaibhav Srivastav and Joshua Lochner and Hugo Larcher and Mathieu Morlon and Lewis Tunstall and Leandro von Werra and Thomas Wolf},
95
+ journal={arXiv preprint arXiv:2504.05299},
96
+ year={2025}
97
+ }
98
+ ```
99
+
100
  ## License
101
 
102
  This is a derivative of the upstream model and is distributed under the same terms