Sentence Similarity
sentence-transformers
Safetensors
xlm-roberta
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run RaduGabriel/BGE-M3-SQL on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/RaduGabriel/BGE-M3-SQL. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/RaduGabriel/BGE-M3-SQL on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use RaduGabriel/BGE-M3-SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use RaduGabriel/BGE-M3-SQL with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("RaduGabriel/BGE-M3-SQL") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Upload 10 files
Browse filesFiles changed (10)
- 1_Pooling/config.jsonAdded+10
- README.md+144-3
- colbert_linear.ptAdded+3
- config.jsonAdded+28
- config_sentence_transformers.jsonAdded+10
- global_step7120/mp_rank_00_model_states.ptAdded+3
- latestAdded+1
- model.safetensorsAdded+3
- modules.jsonAdded+20
- rng_state_0.pthAdded+3
12345678910{ "word_embedding_dimension": 1024, "pooling_mode_cls_token": true, "pooling_mode_mean_tokens": false, "pooling_mode_max_tokens": false, "pooling_mode_mean_sqrt_len_tokens": false, "pooling_mode_weightedmean_tokens": false, "pooling_mode_lasttoken": false, "include_prompt": true}123---license: apache-2.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144---datasets: []language: []library_name: sentence-transformerspipeline_tag: sentence-similaritytags:- sentence-transformers- sentence-similarity- feature-extractionwidget: []---# SentenceTransformerThis is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.## Model Details### Model Description- **Model Type:** Sentence Transformer<!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->- **Maximum Sequence Length:** 8192 tokens- **Output Dimensionality:** 1024 tokens- **Similarity Function:** Cosine Similarity<!-- - **Training Dataset:** Unknown --><!-- - **Language:** Unknown --><!-- - **License:** Unknown -->### Model Sources- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)### Full Model Architecture```SentenceTransformer((0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})(2): Normalize())```## Usage### Direct Usage (Sentence Transformers)First install the Sentence Transformers library:```bashpip install -U sentence-transformers```Then you can load this model and run inference.```pythonfrom sentence_transformers import SentenceTransformer# Download from the 🤗 Hubmodel = SentenceTransformer("sentence_transformers_model_id")# Run inferencesentences = ['The weather is lovely today.',"It's so sunny outside!",'He drove to the stadium.',]embeddings = model.encode(sentences)print(embeddings.shape)# [3, 1024]# Get the similarity scores for the embeddingssimilarities = model.similarity(embeddings, embeddings)print(similarities.shape)# [3, 3]```<!--### Direct Usage (Transformers)<details><summary>Click to see the direct usage in Transformers</summary></details>--><!--### Downstream Usage (Sentence Transformers)You can finetune this model on your own dataset.<details><summary>Click to expand</summary></details>--><!--### Out-of-Scope Use*List how the model may foreseeably be misused and address what users ought not to do with the model.*--><!--## Bias, Risks and Limitations*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*--><!--### Recommendations*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*-->## Training Details### Framework Versions- Python: 3.10.14- Sentence Transformers: 3.0.1- Transformers: 4.42.3- PyTorch: 2.3.1+cu121- Accelerate: 0.31.0- Datasets: 2.20.0- Tokenizers: 0.19.1## Citation### BibTeX<!--## Glossary*Clearly define terms in order to be accessible across audiences.*--><!--## Model Card Authors*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*--><!--## Model Card Contact*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*-->
123version https://git-lfs.github.com/spec/v1oid sha256:adbbe11e57e4e9f586086f51868a609f94515ae2865792cb4b7309e7a0954663size 210067412345678910111213141516171819202122232425262728{ "_name_or_path": "/home/rchivereanu/FlagEmbedding/examples/unified_finetune/models/checkpoint-7120", "architectures": [ "XLMRobertaModel" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "classifier_dropout": null, "eos_token_id": 2, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1024, "initializer_range": 0.02, "intermediate_size": 4096, "layer_norm_eps": 1e-05, "max_position_embeddings": 8194, "model_type": "xlm-roberta", "num_attention_heads": 16, "num_hidden_layers": 24, "output_past": true, "pad_token_id": 1, "position_embedding_type": "absolute", "torch_dtype": "float32", "transformers_version": "4.42.3", "type_vocab_size": 1, "use_cache": true, "vocab_size": 250002}12345678910{ "__version__": { "sentence_transformers": "3.0.1", "transformers": "4.42.3", "pytorch": "2.3.1+cu121" }, "prompts": {}, "default_prompt_name": null, "similarity_fn_name": null}123version https://git-lfs.github.com/spec/v1oid sha256:0626c35591fc7d24870ba4c982da447dfd6ebcd405dd0acbd5e7f973fb487ff0size 79486533081global_step7120123version https://git-lfs.github.com/spec/v1oid sha256:3f485f5f8d337c50160f00473ca0ee9b6397f2c21509879220f5920b0ae22a78size 22710644561234567891011121314151617181920[ { "idx": 0, "name": "0", "path": "", "type": "sentence_transformers.models.Transformer" }, { "idx": 1, "name": "1", "path": "1_Pooling", "type": "sentence_transformers.models.Pooling" }, { "idx": 2, "name": "2", "path": "2_Normalize", "type": "sentence_transformers.models.Normalize" }]123version https://git-lfs.github.com/spec/v1oid sha256:03bd1bfecbe245728cd0da47b8edcfd14a4839d397d0374541aa735f79dbe491size 149601_Pooling/config.jsonAdded+10
README.md+144-3
colbert_linear.ptAdded+3
config.jsonAdded+28
config_sentence_transformers.jsonAdded+10
global_step7120/mp_rank_00_model_states.ptAdded+3
latestAdded+1
model.safetensorsAdded+3
modules.jsonAdded+20
rng_state_0.pthAdded+3