Feature Extraction
sentence-transformers
Safetensors
bert
text-embeddings
information-retrieval
contrastive-learning
research
text-embeddings-inference
Instructions to use PrithviAI9998/CustomLossBGE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use PrithviAI9998/CustomLossBGE with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("PrithviAI9998/CustomLossBGE") 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
|
Download README.md from PrithviAI9998/CustomLossBGE: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/PrithviAI9998/CustomLossBGE/resolve/main/README.md
- Command line
-
hf download hf://PrithviAI9998/CustomLossBGE/README.md
-
curl -L -o README.md https://huggingface.co/PrithviAI9998/CustomLossBGE/resolve/main/README.md
1.91 kB
| library_name: sentence-transformers | |
| base_model: BAAI/bge-base-en-v1.5 | |
| tags: | |
| - sentence-transformers | |
| - feature-extraction | |
| - text-embeddings | |
| - information-retrieval | |
| - contrastive-learning | |
| - research | |
| # CustomLossBGE | |
| ## Overview | |
| CustomLossBGE is a fine-tuned BGE-based sentence embedding model developed for semantic representation learning and research paper title retrieval. | |
| The model explores difficulty-aware contrastive learning to improve semantic alignment between text representations, with particular emphasis on challenging negative examples. | |
| ## Model Details | |
| - **Architecture:** BGE | |
| - **Base model:** BAAI/bge-base-en-v1.5 | |
| - **Training framework:** Sentence Transformers | |
| - **Training objective:** Custom difficulty-aware contrastive loss | |
| - **Embedding dimension:** 768 (verify against the uploaded model) | |
| ## Training Methodology | |
| The model was fine-tuned using a custom loss formulation combining Multiple Negatives Ranking Loss with a difficulty-aware hard-negative margin objective. | |
| The objective incorporates sample difficulty to adapt the separation margin between positive and hard-negative representations. | |
| ## Intended Use | |
| - Semantic similarity | |
| - Dense text retrieval | |
| - Research paper title matching | |
| - Sentence embedding research | |
| ## Usage | |
| ```python | |
| from sentence_transformers import SentenceTransformer | |
| model = SentenceTransformer("PrithviAI9998/CustomLossBGE") | |
| sentences = [ | |
| "Deep learning for network anomaly detection", | |
| "Neural approaches to intrusion detection" | |
| ] | |
| embeddings = model.encode( | |
| sentences, | |
| normalize_embeddings=True | |
| ) | |
| print(embeddings.shape) | |
| ``` | |
| ## Limitations | |
| The model is primarily developed and evaluated in the context of research-oriented semantic retrieval. Performance may vary across domains and text types. | |
| ## Acknowledgements | |
| Developed as part of research on semantic retrieval and original research title recovery. | |