Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- clip
|
| 5 |
+
- text
|
| 6 |
+
- gguf
|
| 7 |
+
- crispembed
|
| 8 |
+
- text-embedding
|
| 9 |
+
pipeline_tag: feature-extraction
|
| 10 |
+
library_name: ggml
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# CLIP Text Encoder Base (GGUF)
|
| 14 |
+
|
| 15 |
+
GGUF conversion of the CLIP text encoder (base) for use with [CrispEmbed](https://github.com/CrispStrobe/CrispEmbed). Extracted from [openai/clip-vit-base-patch16](https://huggingface.co/openai/clip-vit-base-patch16).
|
| 16 |
+
|
| 17 |
+
- **Architecture:** CLIP text transformer with causal attention
|
| 18 |
+
- **Parameters:** 63M
|
| 19 |
+
- **Output:** 512-dimensional L2-normalized embeddings
|
| 20 |
+
- **Tokenizer:** BPE tokenizer (embedded in GGUF), max 77 tokens
|
| 21 |
+
- **Size:** ~244 MB
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
# Embed a single text
|
| 27 |
+
crispembed -m clip-text-base "a photo of a cat"
|
| 28 |
+
|
| 29 |
+
# Embed from file
|
| 30 |
+
crispembed -m clip-text-base --input queries.txt --output embeddings.bin
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## Cross-modal pairing
|
| 34 |
+
|
| 35 |
+
Output embeddings live in the same vector space as [cstr/clip-vit-base-patch16-GGUF](https://huggingface.co/cstr/clip-vit-base-patch16-GGUF). Use both for zero-shot image-text retrieval:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
crispembed -m clip-text-base "a photo of a cat" # text embedding
|
| 39 |
+
crispembed -m clip-vit-base-patch16 --image photo.jpg # vision embedding
|
| 40 |
+
# cosine similarity measures image-text alignment
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Notes
|
| 44 |
+
|
| 45 |
+
- All output embeddings are L2-normalized.
|
| 46 |
+
- BPE tokenizer is bundled inside the GGUF file; no external vocab files needed.
|
| 47 |
+
- This is a GGUF conversion; weights are numerically equivalent to the original HuggingFace model.
|