Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • 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

bkai-foundation-models
/
vietnamese-bi-encoder

Sentence Similarity
PyTorch
Safetensors
sentence-transformers
Transformers
Vietnamese
generic
roberta
feature-extraction
Model card Files Files and versions
xet
Community
9

Instructions to use bkai-foundation-models/vietnamese-bi-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use bkai-foundation-models/vietnamese-bi-encoder with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("bkai-foundation-models/vietnamese-bi-encoder")
    
    sentences = [
        "Làm thế nào Đại học Bách khoa Hà Nội thu hút sinh viên quốc tế?",
        "Đại học Bách khoa Hà Nội đã phát triển các chương trình đào tạo bằng tiếng Anh để làm cho việc học tại đây dễ dàng hơn cho sinh viên quốc tế.",
        "Môi trường học tập đa dạng và sự hỗ trợ đầy đủ cho sinh viên quốc tế tại Đại học Bách khoa Hà Nội giúp họ thích nghi nhanh chóng.",
        "Hà Nội có khí hậu mát mẻ vào mùa thu.",
        "Các món ăn ở Hà Nội rất ngon và đa dạng."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [5, 5]
  • Transformers

    How to use bkai-foundation-models/vietnamese-bi-encoder with Transformers:

    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("bkai-foundation-models/vietnamese-bi-encoder")
    model = AutoModel.from_pretrained("bkai-foundation-models/vietnamese-bi-encoder", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
vietnamese-bi-encoder
1.08 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 20 commits
qducnguyen's picture
qducnguyen
Bump version support
84f9d9a over 2 years ago
  • 1_Pooling
    Bump version support over 2 years ago
  • .gitattributes
    1.88 kB
    Bump version support over 2 years ago
  • README.md
    6.47 kB
    Update README.md over 2 years ago
  • added_tokens.json
    22 Bytes
    Add new SentenceTransformer model. about 3 years ago
  • bpe.codes
    1.14 MB
    Add new SentenceTransformer model. about 3 years ago
  • config.json
    777 Bytes
    Bump version support over 2 years ago
  • config_sentence_transformers.json
    123 Bytes
    Bump version support over 2 years ago
  • custom_tokenizer.py
    325 Bytes
    add word segmentation before tokenization about 3 years ago
  • model.safetensors
    540 MB
    xet
    Bump version support over 2 years ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model. about 3 years ago
  • pipeline.py
    2.71 kB
    add word segmentation before tokenization about 3 years ago
  • pytorch_model.bin
    540 MB
    xet
    Add new SentenceTransformer model. about 3 years ago
  • requirements.txt
    11 Bytes
    add word segmentation before tokenization about 3 years ago
  • sentence_bert_config.json
    53 Bytes
    Add new SentenceTransformer model. about 3 years ago
  • special_tokens_map.json
    167 Bytes
    Add new SentenceTransformer model. about 3 years ago
  • tokenizer_config.json
    1.17 kB
    Bump version support over 2 years ago
  • vocab.txt
    895 kB
    Add new SentenceTransformer model. about 3 years ago