Sentence Similarity
sentence-transformers
Safetensors
qwen2
feature-extraction
Generated from Trainer
dataset_size:99000
loss:MultipleNegativesSymmetricRankingLoss
custom_code
text-embeddings-inference
Instructions to use FINGU-AI/Fingu-instruct-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use FINGU-AI/Fingu-instruct-2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("FINGU-AI/Fingu-instruct-2", trust_remote_code=True) sentences = [ "Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: Glay", "The Theory of Good and Evil is a 1907 book about ethics by the English philosopher Hastings Rashdall, in which the author expounds a theory he calls \"ideal utilitarianism\". It has been seen as Rashdall's most important philosophical work.", "GLAY is a Japanese rock band , formed in Hakodate in 1988 . Glay primarily composes songs in the rock and pop genres , but they have also arranged songs using elements from a wide variety of genres , including punk , electronic , R&B , progressive rock , folk , reggae , gospel , and ska . Originally a visual kei band , the group slowly shifted to less dramatic attire through the years . As of 2008 , Glay had sold an estimated 51 million records ; 28 million singles and 23 million albums , making them one of the top ten best-selling artists of all time in Japan .", "Aashirwad is a 1968 Bollywood film , directed by Hrishikesh Mukherjee . The film stars Ashok Kumar and Sanjeev Kumar . The film is notable for its inclusion of a rap-like song performed by Ashok Kumar , `` Rail Gaadi '' ." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "add_eos_token": true, | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "151643": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151644": { | |
| "content": "<|im_start|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151645": { | |
| "content": "<|im_end|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end|>" | |
| ], | |
| "auto_map": { | |
| "AutoTokenizer": [ | |
| "dunzhang/stella_en_1.5B_v5--tokenization_qwen.Qwen2Tokenizer", | |
| "dunzhang/stella_en_1.5B_v5--tokenization_qwen.Qwen2TokenizerFast" | |
| ] | |
| }, | |
| "bos_token": null, | |
| "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|endoftext|>", | |
| "errors": "replace", | |
| "model_max_length": 512, | |
| "pad_token": "<|endoftext|>", | |
| "split_special_tokens": false, | |
| "tokenizer_class": "Qwen2Tokenizer", | |
| "unk_token": null | |
| } | |