Sentence Similarity
sentence-transformers
Safetensors
English
bert
feature-extraction
Generated from Trainer
dataset_size:56355
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use dat-ai/bge-base-for_text2sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use dat-ai/bge-base-for_text2sql with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("dat-ai/bge-base-for_text2sql") sentences = [ "\n Given the Column informations, generate an SQL query for the following question:\n Column: Finishing position | Points awarded (Platinum) | Points awarded (Gold) | Points awarded (Silver) | Points awarded (Satellite)\n Question: How many platinum points were awarded when 6 gold points were awarded?\n SQL Query: SELECT MAX Points awarded (Platinum) FROM table WHERE Points awarded (Gold) = 6\n ", "How many platinum points were awarded when 6 gold points were awarded?", "Did any team score games that totaled up to 860.5?", "Who had the pole position at the German Grand Prix?" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 296 Bytes
7e5e2ff | 1 2 3 4 5 6 7 8 9 10 | {
"word_embedding_dimension": 768,
"pooling_mode_cls_token": true,
"pooling_mode_mean_tokens": false,
"pooling_mode_max_tokens": false,
"pooling_mode_mean_sqrt_len_tokens": false,
"pooling_mode_weightedmean_tokens": false,
"pooling_mode_lasttoken": false,
"include_prompt": true
} |