Feature Extraction
Transformers
Safetensors
muse_glimmer
metaencoder
multimodal-embedding
image-text-retrieval
video-retrieval
document-retrieval
Instructions to use facebook/meta-encoder-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/meta-encoder-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="facebook/meta-encoder-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("facebook/meta-encoder-v1") model = AutoModel.from_pretrained("facebook/meta-encoder-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -12,6 +12,7 @@ tags:
|
|
| 12 |
|
| 13 |
# MetaEncoder v1
|
| 14 |
|
|
|
|
| 15 |
|
| 16 |
## Usage
|
| 17 |
|
|
@@ -21,7 +22,7 @@ the model in bf16.
|
|
| 21 |
```python
|
| 22 |
from modeling_metaencoder import MetaEncoder
|
| 23 |
|
| 24 |
-
model = MetaEncoder.from_pretrained("
|
| 25 |
```
|
| 26 |
|
| 27 |
`MetaEncoder` has three calls. Callers pass content and task descriptions; the wrapper writes every prompt itself, in
|
|
@@ -98,8 +99,7 @@ similarities). Questions are answered independently; for a question that only ap
|
|
| 98 |
decide the first and ignore the second as needed.
|
| 99 |
|
| 100 |
`decide_batch(states, questions, images=None, video=None)` answers the same questions for many states (one
|
| 101 |
-
`images` / `video` entry per state).
|
| 102 |
-
cached: a fixed question set costs one forward pass per state and question.
|
| 103 |
|
| 104 |
Probabilities are `softmax(score / 0.02)`, the contrastive training temperature. To fit the temperature to your
|
| 105 |
data, decide a labelled set and call `model.calibrate(answers, labels)` with the per-question answers
|
|
|
|
| 12 |
|
| 13 |
# MetaEncoder v1
|
| 14 |
|
| 15 |
+

|
| 16 |
|
| 17 |
## Usage
|
| 18 |
|
|
|
|
| 22 |
```python
|
| 23 |
from modeling_metaencoder import MetaEncoder
|
| 24 |
|
| 25 |
+
model = MetaEncoder.from_pretrained("facebook/meta-encoder-v1")
|
| 26 |
```
|
| 27 |
|
| 28 |
`MetaEncoder` has three calls. Callers pass content and task descriptions; the wrapper writes every prompt itself, in
|
|
|
|
| 99 |
decide the first and ignore the second as needed.
|
| 100 |
|
| 101 |
`decide_batch(states, questions, images=None, video=None)` answers the same questions for many states (one
|
| 102 |
+
`images` / `video` entry per state).
|
|
|
|
| 103 |
|
| 104 |
Probabilities are `softmax(score / 0.02)`, the contrastive training temperature. To fit the temperature to your
|
| 105 |
data, decide a labelled set and call `model.calibrate(answers, labels)` with the per-question answers
|