Sentence Similarity
sentence-transformers
Safetensors
Transformers
English
bert
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run Smxldo/MNLP_M2_document_encoder 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/Smxldo/MNLP_M2_document_encoder. 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/Smxldo/MNLP_M2_document_encoder 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 Smxldo/MNLP_M2_document_encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Smxldo/MNLP_M2_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Smxldo/MNLP_M2_document_encoder") 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] - Transformers
How to use Smxldo/MNLP_M2_document_encoder with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Smxldo/MNLP_M2_document_encoder") model = AutoModel.from_pretrained("Smxldo/MNLP_M2_document_encoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse filesFiles changed (2)
- config.json+1-1
- model.safetensors+2-2
13 unmodified lines141516171718192013 unmodified lines "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 6, "num_hidden_layers": 12, "pad_token_id": 0, "position_embedding_type": "absolute", "torch_dtype": "float32",12323version https://git-lfs.github.com/spec/v1oid sha256:1377e9af0ca0b016a9f2aa584d6fc71ab3ea6804fae21ef9fb1416e2944057acsize 90864192oid sha256:32ed5a30285dd435b59979b997f7d1c337486ad0b53d3ac0bfc78d779368452esize 133462128config.json+1-1
model.safetensors+2-2