Downloads · 30 days
0
wzh19960613/mobileclip2-b-safetensors
mobileclip2-b-safetensors is a zero-shot image classification model from wzh19960613. Use it for the zero-shot image classification task on the model card, and read the license before you ship it in a product. The card lists the license as other.
Downloads · 30 days
0
Access
Public
Updated Jun 27, 2026
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
Chinese documentation: README_CN.md.
Usage is documented in
github.com/wzh19960613/mobileclip2-b-rs.
This repository contains SafeTensors exports of Apple MobileCLIP2-B weights for a Rust loader, plus the CLIP BPE tokenizer.
| File | Purpose |
|---|---|
convert_ts_to_safetensors.py | Conversion script. It supports Apple .pt exports for text, image, and full, plus the Ultralytics .ts text export. |
tokenizer.min.json | CLIP BPE tokenizer, sourced from openai/clip-vit-base-patch32. |
mobileclip2_b.safetensors | Text-only weights, 149 tensors, kept compatible with the older file name. |
mobileclip2_b_image.safetensors | Image-only weights, 162 tensors. |
mobileclip2_b_full.safetensors | Full weights, text.* + image.* + logit_scale, 312 tensors. |
mobileclip2_b.pt: the official Apple full checkpoint from
apple/MobileCLIP2-B.mobileclip2_b.ts: the Ultralytics text encoder TorchScript export from
ultralytics/assets GitHub release,
used for compatibility with the Ultralytics inference path.tokenizer.min.json: the CLIP BPE tokenizer from
openai/clip-vit-base-patch32.python convert_ts_to_safetensors.py \
--input /path/to/mobileclip2_b.pt \
--component text \
--output mobileclip2_b.safetensors
python convert_ts_to_safetensors.py \
--input /path/to/mobileclip2_b.pt \
--component image \
--output mobileclip2_b_image.safetensors
python convert_ts_to_safetensors.py \
--input /path/to/mobileclip2_b.pt \
--component full \
--output mobileclip2_b_full.safetensors
python convert_ts_to_safetensors.py \
--input /path/to/mobileclip2_b.ts \
--component text \
--output mobileclip2_b.safetensors
Key layout:
token_embedding.weight.cls_token and blocks.0.*.text.* and image.* prefixes, plus logit_scale.convert_ts_to_safetensors.py is MIT licensed. The model weights are derived
from Apple's official MobileCLIP2-B release and follow the Apple Sample Code
License / Apple ML Research Model Terms of Use, for research use only.
tokenizer.min.json is sourced from the OpenAI CLIP tokenizer and follows its
MIT License.