---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:53
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/clip-ViT-L-14
widget:
- source_sentence: The Hugging Face Transformers Library | Example Code + Chatbot
UI with Gradio
sentences:
- Shit Happens, Stay Solution Oriented
- 3 Ways to Make a Custom AI Assistant | RAG, Tools, & Fine-tuning
- How to Manage Data Science Projects
- source_sentence: 5 Questions Every Data Scientist Should Hardcode into Their Brain
sentences:
- 5 AI Projects You Can Build This Weekend (with Python)
- An Introduction to Decision Trees | Gini Impurity & Python Code
- How to Deploy ML Solutions with FastAPI, Docker, & AWS
- source_sentence: My $100,000+ Data Science Resume (what got me hired)
sentences:
- The Mapper Algorithm | Overview & Python Example Code
- How to Build Data Pipelines for ML Projects (w/ Python Code)
- How to Make a Data Science Portfolio With GitHub Pages (2024)
datasets:
- shawhin/yt-title-thumbnail-pairs
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy
model-index:
- name: SentenceTransformer based on sentence-transformers/clip-ViT-L-14
results:
- task:
type: triplet
name: Triplet
dataset:
name: yt title thumbnail train
type: yt-title-thumbnail-train
metrics:
- type: cosine_accuracy
value: 1.0
name: Cosine Accuracy
- task:
type: triplet
name: Triplet
dataset:
name: yt title thumbnail valid
type: yt-title-thumbnail-valid
metrics:
- type: cosine_accuracy
value: 1.0
name: Cosine Accuracy
---
# SentenceTransformer based on sentence-transformers/clip-ViT-L-14
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/clip-ViT-L-14](https://huggingface.co/sentence-transformers/clip-ViT-L-14) on the [yt-title-thumbnail-pairs](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs) dataset. It maps sentences & paragraphs to a None-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [sentence-transformers/clip-ViT-L-14](https://huggingface.co/sentence-transformers/clip-ViT-L-14)
- **Maximum Sequence Length:** None tokens
- **Output Dimensionality:** None dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [yt-title-thumbnail-pairs](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs)
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): CLIPModel()
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("babelmanish/clip-title-thumbnail-embeddings")
# Run inference
sentences = [
'My $100,000+ Data Science Resume (what got me hired)',
'The Mapper Algorithm | Overview & Python Example Code',
'How to Build Data Pipelines for ML Projects (w/ Python Code)',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Triplet
* Datasets: `yt-title-thumbnail-train` and `yt-title-thumbnail-valid`
* Evaluated with [TripletEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | yt-title-thumbnail-train | yt-title-thumbnail-valid |
|:--------------------|:-------------------------|:-------------------------|
| **cosine_accuracy** | **1.0** | **1.0** |
## Training Details
### Training Dataset
#### yt-title-thumbnail-pairs
* Dataset: [yt-title-thumbnail-pairs](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs) at [c1b9a13](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs/tree/c1b9a131c52a15636472e440835e2b8634799f0e)
* Size: 53 training samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 53 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | PIL.JpegImagePlugin.JpegImageFile | string | string |
| details |
| Multimodal RAG: A Beginner-friendly Guide (with Python Code)
| What Nature Can Teach Us About Business...
|
|
| Detecting Power Laws in Real-world Data | w/ Python Code
| I Have 90 Days to Make $10k/mo—Here's my plan
|
|
| I Quit My Job… Here’s How Much I Made 1 Year Later
| Persistent Homology | Introduction & Python Example Code
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### yt-title-thumbnail-pairs
* Dataset: [yt-title-thumbnail-pairs](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs) at [c1b9a13](https://huggingface.co/datasets/shawhin/yt-title-thumbnail-pairs/tree/c1b9a131c52a15636472e440835e2b8634799f0e)
* Size: 11 evaluation samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 11 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | PIL.JpegImagePlugin.JpegImageFile | string | string |
| details |
| I Was Wrong About AI Consulting (what I learned)
| How to Make a Data Science Portfolio With GitHub Pages (2024)
|
|
| My $100,000+ Data Science Resume (what got me hired)
| The Mapper Algorithm | Overview & Python Example Code
|
|
| 4 Skills You Need to Be a Full-Stack Data Scientist
| Fine-Tuning Text Embeddings For Domain-specific Search (w/ Python)
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `learning_rate`: 0.0001
- `num_train_epochs`: 2
#### All Hyperparameters