Sentence Similarity
sentence-transformers
Safetensors
bert
advai-notebooks
embedding
demo
synthetic-data
random-initialization
text-embeddings-inference
Instructions to use widebluesky/wbs-embedding-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use widebluesky/wbs-embedding-demo with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("widebluesky/wbs-embedding-demo") 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] - Notebooks
- Google Colab
- Kaggle
Download tokenizer.json from widebluesky/wbs-embedding-demo: direct link, hf CLI and curl.
- Browser
- Download file 3.88 kB
-
https://huggingface.co/widebluesky/wbs-embedding-demo/resolve/main/tokenizer.json
- Command line
-
hf download hf://widebluesky/wbs-embedding-demo/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/widebluesky/wbs-embedding-demo/resolve/main/tokenizer.json
3.88 kB
| { | |
| "version": "1.0", | |
| "truncation": { | |
| "direction": "Right", | |
| "max_length": 64, | |
| "strategy": "LongestFirst", | |
| "stride": 0 | |
| }, | |
| "padding": { | |
| "strategy": "BatchLongest", | |
| "direction": "Right", | |
| "pad_to_multiple_of": null, | |
| "pad_id": 0, | |
| "pad_type_id": 0, | |
| "pad_token": "[PAD]" | |
| }, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "[PAD]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "[UNK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "[CLS]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "[SEP]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 4, | |
| "content": "[MASK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": { | |
| "type": "BertNormalizer", | |
| "clean_text": true, | |
| "handle_chinese_chars": true, | |
| "strip_accents": null, | |
| "lowercase": true | |
| }, | |
| "pre_tokenizer": { | |
| "type": "BertPreTokenizer" | |
| }, | |
| "post_processor": { | |
| "type": "TemplateProcessing", | |
| "single": [ | |
| { | |
| "SpecialToken": { | |
| "id": "[CLS]", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "SpecialToken": { | |
| "id": "[SEP]", | |
| "type_id": 0 | |
| } | |
| } | |
| ], | |
| "pair": [ | |
| { | |
| "SpecialToken": { | |
| "id": "[CLS]", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "SpecialToken": { | |
| "id": "[SEP]", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "B", | |
| "type_id": 1 | |
| } | |
| }, | |
| { | |
| "SpecialToken": { | |
| "id": "[SEP]", | |
| "type_id": 1 | |
| } | |
| } | |
| ], | |
| "special_tokens": { | |
| "[CLS]": { | |
| "id": "[CLS]", | |
| "ids": [ | |
| 2 | |
| ], | |
| "tokens": [ | |
| "[CLS]" | |
| ] | |
| }, | |
| "[SEP]": { | |
| "id": "[SEP]", | |
| "ids": [ | |
| 3 | |
| ], | |
| "tokens": [ | |
| "[SEP]" | |
| ] | |
| } | |
| } | |
| }, | |
| "decoder": { | |
| "type": "WordPiece", | |
| "prefix": "##", | |
| "cleanup": true | |
| }, | |
| "model": { | |
| "type": "WordPiece", | |
| "unk_token": "[UNK]", | |
| "continuing_subword_prefix": "##", | |
| "max_input_chars_per_word": 100, | |
| "vocab": { | |
| "[PAD]": 0, | |
| "[UNK]": 1, | |
| "[CLS]": 2, | |
| "[SEP]": 3, | |
| "[MASK]": 4, | |
| "account": 5, | |
| "app": 6, | |
| "billing": 7, | |
| "bug": 8, | |
| "can": 9, | |
| "cancel": 10, | |
| "cancellation": 11, | |
| "card": 12, | |
| "change": 13, | |
| "charged": 14, | |
| "contact": 15, | |
| "crash": 16, | |
| "document": 17, | |
| "duplicate": 18, | |
| "email": 19, | |
| "error": 20, | |
| "explain": 21, | |
| "features": 22, | |
| "fix": 23, | |
| "help": 24, | |
| "how": 25, | |
| "invoice": 26, | |
| "login": 27, | |
| "my": 28, | |
| "now": 29, | |
| "other": 30, | |
| "outage": 31, | |
| "password": 32, | |
| "payment": 33, | |
| "plan": 34, | |
| "please": 35, | |
| "pricing": 36, | |
| "profile": 37, | |
| "query": 38, | |
| "refund": 39, | |
| "reset": 40, | |
| "service": 41, | |
| "settings": 42, | |
| "soon": 43, | |
| "subscription": 44, | |
| "technical": 45, | |
| "twice": 46, | |
| "update": 47, | |
| "what": 48, | |
| "work": 49, | |
| "your": 50 | |
| } | |
| } | |
| } |