Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:9984
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Narekatsy/fine-tuned-cosqa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Narekatsy/fine-tuned-cosqa with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Narekatsy/fine-tuned-cosqa") sentences = [ "python to dict if only one item", "def get_from_gnucash26_date(date_str: str) -> date:\n \"\"\" Creates a datetime from GnuCash 2.6 date string \"\"\"\n date_format = \"%Y%m%d\"\n result = datetime.strptime(date_str, date_format).date()\n return result", "def multidict_to_dict(d):\n \"\"\"\n Turns a werkzeug.MultiDict or django.MultiValueDict into a dict with\n list values\n :param d: a MultiDict or MultiValueDict instance\n :return: a dict instance\n \"\"\"\n return dict((k, v[0] if len(v) == 1 else v) for k, v in iterlists(d))", "def wipe_table(self, table: str) -> int:\n \"\"\"Delete all records from a table. Use caution!\"\"\"\n sql = \"DELETE FROM \" + self.delimit(table)\n return self.db_exec(sql)" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle