Sentence Similarity
sentence-transformers
Safetensors
mpnet
feature-extraction
Generated from Trainer
dataset_size:300000
loss:CoSENTLoss
text-embeddings-inference
Instructions to use s2593817/sft-sql-embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use s2593817/sft-sql-embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("s2593817/sft-sql-embedding") sentences = [ "SELECT DISTINCT count(alias3.col1) , alias1.col2 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias1.col1 = alias3.col1 WHERE alias2.col3 = str AND alias3.year = num GROUP BY alias1.col2", "SELECT col1 , avg(col2) FROM table1 WHERE col3 LIKE str GROUP BY col1", "SELECT col1 , col2 FROM table1 WHERE col3 LIKE str GROUP BY col1 ORDER BY count(*) DESC LIMIT num", "SELECT col1 , avg(col2) FROM table1 GROUP BY col1 ORDER BY avg(col2)" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
File size: 622 Bytes
c89964f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | {
"_name_or_path": "models/sft-sql-embedding",
"architectures": [
"MPNetModel"
],
"attention_probs_dropout_prob": 0.1,
"bos_token_id": 0,
"eos_token_id": 2,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_norm_eps": 1e-05,
"max_position_embeddings": 514,
"model_type": "mpnet",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"pad_token_id": 1,
"relative_attention_num_buckets": 32,
"torch_dtype": "float32",
"transformers_version": "4.41.2",
"vocab_size": 30527
}
|