tiny clip text 2
Overview
Tiny CLIP Text 2 is a lightweight image-text retrieval model designed for developers who need efficient embedding generation without the overhead of massive vision-language transformers. By optimizing the text-encoder pipeline, it allows for rapid semantic mapping between textual queries and visual assets, making it ideal for edge deployments or high-throughput indexing tasks. Unlike full-scale CLIP models, this version prioritizes a smaller footprint, reducing latency in search-and-retrieval workflows while maintaining the core ability to align multi-modal representations. It integrates easily into existing vector databases for implementing visual search or automated tagging systems where resource constraints are a primary concern.
Highlights
- Optimized for low-latency image-text retrieval tasks
- Low memory footprint ideal for edge deployment
- Seamless integration with vector search databases
- Apache-2.0 license for flexible commercial use
Usage
Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("peft-internal-testing/tiny-clip-text-2")
tokenizer = AutoTokenizer.from_pretrained("peft-internal-testing/tiny-clip-text-2")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
Guidance
pip install -U huggingface_hub
CLI Download
Download the full repository
Download the full repository
huggingface-cli download peft-internal-testing/tiny-clip-text-2
Download a single file to a local folder (e.g. config.json into ./dir)
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download peft-internal-testing/tiny-clip-text-2 config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('peft-internal-testing/tiny-clip-text-2')
Git Download
Make sure git-lfs is installed first
Git Download
git lfs install
git clone https://huggingface.co/peft-internal-testing/tiny-clip-text-2
To skip LFS large-file downloads, use:
Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/peft-internal-testing/tiny-clip-text-2
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
Install Transformers
pip install -U transformers torch
Load the model and run inference
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('peft-internal-testing/tiny-clip-text-2')
tokenizer = AutoTokenizer.from_pretrained('peft-internal-testing/tiny-clip-text-2')