CLIP Embedding Service
CLIP-ViT-H/14 多模态 Embedding 服务,支持文本和图片向量化。
Overview
- Model: laion/CLIP-ViT-H-14-laion2B-s32B-b79K
- Dimension: 1024
- Precision: float16
- Port: 9086
- GPU: 2 (default)
API
GET /api/status
Service health and GPU info.
POST /api/text
Text embedding.
{"texts": ["hello world", "a cat"]}
POST /api/image
Image embedding (file path, URL, or base64 data URI).
{"images": ["/path/to/img.jpg", "https://example.com/img.png"]}
POST /api/embed
Combined text + image embedding.
{"texts": ["a cat"], "images": ["/path/to/cat.jpg"]}
Model Download (Offline Deploy)
pip install huggingface_hub
huggingface-cli download laion/CLIP-ViT-H-14-laion2B-s32B-b79K \
--local-dir /data/ymq/models/laion/CLIP-ViT-H-14-laion2B-s32B-b79K \
--local-dir-use-symlinks False
Size: ~15GB
Deploy
bash build.sh deploy # start
bash build.sh stop # stop
bash build.sh status # check
Description
Languages
Shell
54.9%
Python
45.1%