MultiModal
ClipEncoder
Bases: EmbetterBase
Clip model than can encode text and images.
Under the hood it just wraps around the implementation of sentence-transformers
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
name of model, see available options |
'clip-ViT-B-32'
|
|
device |
manually override cpu/gpu device, tries to grab gpu automatically when available |
None
|
|
quantize |
turns on quantization |
False
|
|
num_threads |
number of treads for pytorch to use, only affects when device=cpu |
None
|
The following model names should be supported:
clip-ViT-B-32
clip-ViT-B-16
clip-ViT-B-14
clip-ViT-B-32-multilingual-v1
Source code in embetter/multi/_clip.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|