Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

unsloth
/
gte-modernbert-base

Sentence Similarity
Transformers
PyTorch
ONNX
Safetensors
sentence-transformers
Transformers.js
English
modernbert
feature-extraction
mteb
embedding
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use unsloth/gte-modernbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use unsloth/gte-modernbert-base with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("unsloth/gte-modernbert-base")
    model = AutoModel.from_pretrained("unsloth/gte-modernbert-base")
  • sentence-transformers

    How to use unsloth/gte-modernbert-base with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("unsloth/gte-modernbert-base")
    
    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.js

    How to use unsloth/gte-modernbert-base with Transformers.js:

    // npm i @huggingface/transformers
    import { pipeline } from '@huggingface/transformers';
    
    // Allocate pipeline
    const pipe = await pipeline('sentence-similarity', 'unsloth/gte-modernbert-base');
  • Notebooks
  • Google Colab
  • Kaggle
gte-modernbert-base
2.53 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
danielhanchen's picture
danielhanchen
Upload folder using huggingface_hub
a56ccd7 verified 4 months ago
  • 1_Pooling
    Upload folder using huggingface_hub 4 months ago
  • onnx
    Upload folder using huggingface_hub 4 months ago
  • .gitattributes
    1.52 kB
    initial commit 4 months ago
  • README.md
    14 kB
    Upload folder using huggingface_hub 4 months ago
  • config.json
    1.18 kB
    Upload folder using huggingface_hub 4 months ago
  • config_sentence_transformers.json
    205 Bytes
    Upload folder using huggingface_hub 4 months ago
  • model.safetensors
    298 MB
    xet
    Upload folder using huggingface_hub 4 months ago
  • modules.json
    229 Bytes
    Upload folder using huggingface_hub 4 months ago
  • pytorch_model.bin

    Detected Pickle imports (3)

    • "torch._utils._rebuild_tensor_v2",
    • "collections.OrderedDict",
    • "torch.HalfStorage"

    What is a pickle import?

    298 MB
    xet
    Upload folder using huggingface_hub 4 months ago
  • special_tokens_map.json
    694 Bytes
    Upload folder using huggingface_hub 4 months ago
  • tokenizer.json
    3.58 MB
    Upload folder using huggingface_hub 4 months ago
  • tokenizer_config.json
    20.9 kB
    Upload folder using huggingface_hub 4 months ago