Sentence Similarity
sentence-transformers
Safetensors
roberta
chemistry
molecular-similarity
cheminformatics
ssl
smiles
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run gbyuvd/miniChembed-prototype on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/gbyuvd/miniChembed-prototype. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/gbyuvd/miniChembed-prototype on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use gbyuvd/miniChembed-prototype with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use gbyuvd/miniChembed-prototype with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("gbyuvd/miniChembed-prototype") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Upload 2 files
Browse filesFiles changed (2)
- examples/directusage.ipynbAdded+68
- examples/faiss.ipynbAdded
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "e7caa8ad", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(4, 320)\n", "tensor([[ 1.0000, 0.1580, -0.4305, -0.5529],\n", " [ 0.1580, 1.0000, 0.6916, 0.6522],\n", " [-0.4305, 0.6916, 1.0000, 0.9836],\n", " [-0.5529, 0.6522, 0.9836, 1.0000]])\n" ] } ], "source": [ "from sentence_transformers import SentenceTransformer\n", "\n", "# Download from the 🤗 Hub\n", "model = SentenceTransformer(\"gbyuvd/miniChembed-prototype\")\n", "# Run inference\n", "sentences = [\n", " 'O=C1/C=C\\\\C=C2/N1C[C@@H]3CNC[C@H]2C3', # Cytisine\n", " \"n1c2cc3c(cc2ncc1)[C@@H]4CNC[C@H]3C4\", # Varenicline\n", " \"c1ncccc1[C@@H]2CCCN2C\", # Nicotine\n", " 'Nc1nc2cncc-2co1', # CID: 162789184 \n", "]\n", "embeddings = model.encode(sentences)\n", "print(embeddings.shape)\n", "# (4, 768)\n", "\n", "# Get the similarity scores for the embeddings\n", "similarities = model.similarity(embeddings, embeddings)\n", "print(similarities)\n", "# tensor([[1.0000, 0.4397, 0.3172, 0.0382],\n", "# [0.4397, 1.0000, 0.2543, 0.1725],\n", "# [0.3172, 0.2543, 1.0000, 0.2371],\n", "# [0.0382, 0.1725, 0.2371, 1.0000]])\n" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.0" } }, "nbformat": 4, "nbformat_minor": 5}examples/directusage.ipynbAdded+68
examples/faiss.ipynbAdded