Views
No views yet
clip_text_quantized.onnx (62MB)clip_vision_quantized.onnx (337MB)vit_base_quantized.onnx (84MB)
.ipynb file and upload it to Google Colab.1# Install Hugging Face Hub
2pip install huggingface_hub
3
4# Download CLIP Models
5huggingface-cli download JanadaSroor/vision-models models/clip_text_quantized.onnx --local-dir .
6huggingface-cli download JanadaSroor/vision-models models/clip_vision_quantized.onnx --local-dir .
7
8# Download ViT Model
9huggingface-cli download JanadaSroor/vision-models models/vit_base_quantized.onnx --local-dir .| Model | Original Size | Compressed Size | Quantization | Input Shape | Output Shape |
|---|---|---|---|---|---|
| CLIP Text | ~120MB | 62MB (⬇️ 48%) | ✅ INT8 | [batch, 77] | [batch, 512] |
| CLIP Vision | ~340MB | 337MB | ❌ FP32 | [batch, 3, 224, 224] | [batch, 512] |
| ViT Base | ~340MB | 84MB (⬇️ 75%) | ✅ INT8 | [batch, 3, 224, 224] | [batch, 768] |
.onnx files to your project's src/main/assets/ directory.1val session = OrtSession.create(env, modelBytes, options)
2val inputs = mapOf("input_ids" to textTensor)
3val results = session.run(inputs)Hugging Face Optimum and ONNX Runtime Quantization tools to achieve these results: