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

  • Log In
  • Sign Up

facebook
/
drama-1b

Sentence Similarity
Transformers
Safetensors
sentence-transformers
llama
feature-extraction
custom_code
text-embeddings-inference
Model card Files Files and versions
xet
Community
2

Instructions to use facebook/drama-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use facebook/drama-1b with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("facebook/drama-1b", trust_remote_code=True)
    model = AutoModel.from_pretrained("facebook/drama-1b", trust_remote_code=True)
  • sentence-transformers

    How to use facebook/drama-1b with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("facebook/drama-1b", trust_remote_code=True)
    
    sentences = [
        "هذا شخص سعيد",
        "هذا كلب سعيد",
        "هذا شخص سعيد جدا",
        "اليوم هو يوم مشمس"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
drama-1b
4.96 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
ccsasuke's picture
ccsasuke
Integrate Sentence Transformers, prevent manual tokenizer EOS (#1)
918eb71 verified about 1 year ago
  • 1_Pooling
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • .gitattributes
    1.57 kB
    Initial commit about 1 year ago
  • README.md
    7.39 kB
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • config.json
    928 Bytes
    Initial commit about 1 year ago
  • config_sentence_transformers.json
    231 Bytes
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • evaluation.png
    182 kB
    Initial commit about 1 year ago
  • model.safetensors
    4.94 GB
    xet
    Initial commit about 1 year ago
  • modeling_drama.py
    6.08 kB
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • modules.json
    349 Bytes
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • sentence_bert_config.json
    56 Bytes
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • special_tokens_map.json
    449 Bytes
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • tokenizer.json
    17.2 MB
    xet
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago
  • tokenizer_config.json
    50.6 kB
    Integrate Sentence Transformers, prevent manual tokenizer EOS (#1) about 1 year ago