Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

omai-research
/
milco-300m

Sentence Similarity
Transformers
PyTorch
sentence-transformers
milco
feature-extraction
sparse
sparse-encoder
sparse-retrieval
multilingual
learned-sparse
cross-lingual
custom_code
Model card Files Files and versions
xet
Community
2

Instructions to use omai-research/milco-300m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use omai-research/milco-300m with Transformers:

    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("omai-research/milco-300m", trust_remote_code=True, device_map="auto")
  • sentence-transformers

    How to use omai-research/milco-300m with sentence-transformers:

    from sentence_transformers import SparseEncoder
    
    model = SparseEncoder("omai-research/milco-300m", trust_remote_code=True)
    
    queries = ["Which planet is known as the Red Planet?"]
    documents = [
    	"Venus is often called Earth's twin because of its similar size and proximity.",
    	"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
    	"Jupiter, the largest planet in our solar system, has a prominent red spot.",
    ]
    
    query_embeddings = model.encode_query(queries)
    document_embeddings = model.encode_document(documents)
    
    similarities = model.similarity(query_embeddings, document_embeddings)
    print(similarities)
  • Notebooks
  • Google Colab
  • Kaggle
milco-300m
1.34 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 6 commits
thongnt's picture
thongnt
tomaarsen's picture
tomaarsen HF Staff
Integrate with Sentence Transformers and support Transformers v5 (#2)
5e469e9 about 1 month ago
  • .gitattributes
    1.57 kB
    Upload tokenizer 8 months ago
  • README.md
    9.09 kB
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • config.json
    6.25 kB
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • config_sentence_transformers.json
    235 Bytes
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • milco.py
    11.6 kB
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • modules.json
    174 Bytes
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • pytorch_model.bin

    Detected Pickle imports (3)

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

    What is a pickle import?

    1.32 GB
    xet
    Upload model 8 months ago
  • sentence_bert_config.json
    349 Bytes
    Integrate with Sentence Transformers and support Transformers v5 (#2) about 1 month ago
  • special_tokens_map.json
    964 Bytes
    Upload tokenizer 8 months ago
  • tokenizer.json
    17.1 MB
    xet
    Upload tokenizer 8 months ago
  • tokenizer_config.json
    1.18 kB
    Upload tokenizer 8 months ago