Image-to-Text
Transformers.js
PyTorch
ONNX
Safetensors
vision-encoder-decoder
image-text-to-text
image-captioning
Instructions to use Mozilla/distilvit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Mozilla/distilvit with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-to-text', 'Mozilla/distilvit');
Download quantize_config.json from Mozilla/distilvit: direct link, hf CLI and curl.
- Browser
- Download file 3.24 kB
-
https://huggingface.co/Mozilla/distilvit/resolve/refs%2Fpr%2F2/quantize_config.json
- Command line
-
hf download hf://Mozilla/distilvit@refs/pr/2/quantize_config.json
-
curl -L -o quantize_config.json https://huggingface.co/Mozilla/distilvit/resolve/refs%2Fpr%2F2/quantize_config.json
3.24 kB
| { | |
| "per_channel": false, | |
| "reduce_range": false, | |
| "per_model_config": { | |
| "decoder_model": { | |
| "op_types": [ | |
| "Sqrt", | |
| "MatMul", | |
| "Concat", | |
| "Mul", | |
| "Constant", | |
| "Shape", | |
| "Range", | |
| "Pow", | |
| "Div", | |
| "Split", | |
| "Sub", | |
| "Where", | |
| "Reshape", | |
| "Gather", | |
| "Unsqueeze", | |
| "Cast", | |
| "ReduceMean", | |
| "Softmax", | |
| "ConstantOfShape", | |
| "Slice", | |
| "Gemm", | |
| "Tanh", | |
| "Transpose", | |
| "Add", | |
| "Squeeze" | |
| ], | |
| "weight_type": "QInt8" | |
| }, | |
| "decoder_model_merged": { | |
| "op_types": [ | |
| "Sqrt", | |
| "MatMul", | |
| "Concat", | |
| "Mul", | |
| "If", | |
| "Constant", | |
| "Shape", | |
| "Range", | |
| "Pow", | |
| "Div", | |
| "Split", | |
| "Sub", | |
| "Where", | |
| "Reshape", | |
| "Gather", | |
| "Unsqueeze", | |
| "Cast", | |
| "ReduceMean", | |
| "Softmax", | |
| "ConstantOfShape", | |
| "Slice", | |
| "Gemm", | |
| "Tanh", | |
| "Transpose", | |
| "Add", | |
| "Squeeze" | |
| ], | |
| "weight_type": "QInt8" | |
| }, | |
| "decoder_with_past_model": { | |
| "op_types": [ | |
| "Sqrt", | |
| "MatMul", | |
| "Concat", | |
| "Mul", | |
| "Constant", | |
| "Shape", | |
| "Range", | |
| "Pow", | |
| "Div", | |
| "Split", | |
| "Sub", | |
| "Where", | |
| "Reshape", | |
| "Gather", | |
| "Unsqueeze", | |
| "Cast", | |
| "ReduceMean", | |
| "Softmax", | |
| "ConstantOfShape", | |
| "Slice", | |
| "Gemm", | |
| "Tanh", | |
| "Transpose", | |
| "Squeeze", | |
| "Add" | |
| ], | |
| "weight_type": "QInt8" | |
| }, | |
| "encoder_model": { | |
| "op_types": [ | |
| "Sqrt", | |
| "MatMul", | |
| "Concat", | |
| "Mul", | |
| "Constant", | |
| "Expand", | |
| "Shape", | |
| "Pow", | |
| "Div", | |
| "Conv", | |
| "Sub", | |
| "Where", | |
| "Reshape", | |
| "Gather", | |
| "Erf", | |
| "Unsqueeze", | |
| "Equal", | |
| "ReduceMean", | |
| "Softmax", | |
| "ConstantOfShape", | |
| "Slice", | |
| "Transpose", | |
| "Add" | |
| ], | |
| "weight_type": "QUInt8" | |
| } | |
| } | |
| } |