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

  • Log In
  • Sign Up

YangsHao
/
RecBERT

Sentence Similarity
sentence-transformers
PyTorch
Transformers
bert
feature-extraction
text-embeddings-inference
Model card Files Files and versions
xet
Community
1

Instructions to use YangsHao/RecBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use YangsHao/RecBERT with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("YangsHao/RecBERT")
    
    sentences = [
        "汪汪队立大功第1季动画动画冒险剧情本领高强的狗狗巡逻队精通科技的10岁男孩",
        "超人总动员2喜剧动作动画冒险家庭亲情超级英雄励志超能先生变奶爸超人家族时隔14年强势回归",
        "星汉灿烂·月升沧海剧情爱情星汉灿烂·月升沧海该剧讲述了程家女名少商",
        "外星人事件2喜剧科幻剧情山炮大战爆笑来袭传闻,几十年前外星人曾开着飞船造访过下井沟"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Transformers

    How to use YangsHao/RecBERT with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("YangsHao/RecBERT")
    model = AutoModel.from_pretrained("YangsHao/RecBERT")
  • Notebooks
  • Google Colab
  • Kaggle
RecBERT
Ctrl+K
Ctrl+K
  • 1 contributor
History: 17 commits
YangsHao's picture
YangsHao
Update README.md
47960a5 almost 3 years ago
  • 1_Pooling
    Upload 1_Pooling with huggingface_hub almost 3 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 3 years ago
  • README.md
    3.3 kB
    Update README.md almost 3 years ago
  • config.json
    813 Bytes
    Pushing RecBERT model almost 3 years ago
  • config_sentence_transformers.json
    118 Bytes
    Pushing RecBERT model almost 3 years ago
  • modules.json
    229 Bytes
    Pushing RecBERT model almost 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

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

    What is a pickle import?

    409 MB
    xet
    Pushing RecBERT model almost 3 years ago
  • sentence_bert_config.json
    53 Bytes
    Pushing RecBERT model almost 3 years ago
  • special_tokens_map.json
    125 Bytes
    Pushing RecBERT model almost 3 years ago
  • tokenizer.json
    439 kB
    Pushing RecBERT model almost 3 years ago
  • tokenizer_config.json
    376 Bytes
    Pushing RecBERT model almost 3 years ago
  • vocab.txt
    110 kB
    Pushing RecBERT model almost 3 years ago