Instructions to use aleynahukmet/bge-medical-small-en-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aleynahukmet/bge-medical-small-en-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="aleynahukmet/bge-medical-small-en-v1.5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("aleynahukmet/bge-medical-small-en-v1.5") model = AutoModel.from_pretrained("aleynahukmet/bge-medical-small-en-v1.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -65,6 +65,30 @@ The model is hosted on the Hugging Face model hub at [aleynahukmet/bge-medical-s
|
|
| 65 |
4. Utilize Encoded Vectors:
|
| 66 |
The encoded vectors can be used for various downstream tasks, such as semantic search, clustering, or classification, depending on your specific application needs.
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
|
|
|
|
| 65 |
4. Utilize Encoded Vectors:
|
| 66 |
The encoded vectors can be used for various downstream tasks, such as semantic search, clustering, or classification, depending on your specific application needs.
|
| 67 |
|
| 68 |
+
## Training:
|
| 69 |
+
You can review the code for fine-tuning in this [notebook](https://github.com/aleynahukmet/medical-qa/blob/main/medical-qa.ipynb).
|
| 70 |
+
|
| 71 |
+
## Evaluation:
|
| 72 |
+
|
| 73 |
+
I used Translation Evaluator to evaluate the model on the test set, and it achieved ~0.887 (a 10-point improvement from 0.78 for the base model).
|
| 74 |
+
|
| 75 |
+
## Requirements:
|
| 76 |
+
|
| 77 |
+
```
|
| 78 |
+
datasets==2.18.0
|
| 79 |
+
numpy==1.24.4
|
| 80 |
+
pandas==2.0.3
|
| 81 |
+
sentence_transformers==2.5.1
|
| 82 |
+
torch==2.0.1
|
| 83 |
+
|
| 84 |
+
```
|
| 85 |
+
If you don't have the requirements installed, they can be installed with the following:
|
| 86 |
+
|
| 87 |
+
```
|
| 88 |
+
pip install -r requirements.txt
|
| 89 |
+
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
|
| 93 |
|
| 94 |
|