bge base en v1.5 course recommender v5
Overview
Highlights
- Optimized for educational content and course semantic similarity
- Apache-2.0 licensed for flexible commercial integration
- High-efficiency dense vector embeddings for fast retrieval
- Ideal for RAG pipelines and academic recommendation systems
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("datasocietyco/bge-base-en-v1.5-course-recommender-v5")
tokenizer = AutoTokenizer.from_pretrained("datasocietyco/bge-base-en-v1.5-course-recommender-v5")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download datasocietyco/bge-base-en-v1.5-course-recommender-v5
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download datasocietyco/bge-base-en-v1.5-course-recommender-v5 config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('datasocietyco/bge-base-en-v1.5-course-recommender-v5')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/datasocietyco/bge-base-en-v1.5-course-recommender-v5
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/datasocietyco/bge-base-en-v1.5-course-recommender-v5
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('datasocietyco/bge-base-en-v1.5-course-recommender-v5')
tokenizer = AutoTokenizer.from_pretrained('datasocietyco/bge-base-en-v1.5-course-recommender-v5')
Full Documentation
---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:45
- loss:MultipleNegativesRankingLoss
base_model: BAAI/bge-base-en-v1.5
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
SentenceTransformer based on BAAI/bge-base-en-v1.5
This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-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: BAAI/bge-base-en-v1.5 <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, '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:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import SentenceTransformer
Download from the 🤗 Hub
model = SentenceTransformer("datasocietyco/bge-base-en-v1.5-course-recommender-v5")
Run inference
sentences = [
'The weather is lovely today.',
"It's so sunny outside!",
'He drove to the stadium.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
[3, 768]
Get the similarity scores for the embeddings
similarities = 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
Training Dataset
#### Unnamed Dataset
- Size: 45 training samples
- Columns: <code>anchor</code> and <code>positive</code>
- Approximate statistics based on the first 45 samples:
- Samples: