Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:267
loss:ContrastiveLoss
text-embeddings-inference
Instructions to use officialthinkingstack/Sentence-Matcher-v0.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use officialthinkingstack/Sentence-Matcher-v0.3 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("officialthinkingstack/Sentence-Matcher-v0.3") sentences = [ "hypertension\nThe patient's primary diagnosis is hypertension, as stated in the visit note.\nBP medications\nThe patient is on BP medications which are used to treat hypertension.\nBP management\nThe visit note mentions follow-up on BP management, indicating ongoing treatment for hypertension.\nHTN\nHTN is the abbreviation for hypertension, which is the patient's diagnosed condition.\nBP was measured at 138/90\nThis blood pressure reading supports the diagnosis of hypertension as it is elevated.\nmonthly bp at home have been around that number or higher\nConsistently high blood pressure readings confirm the presence of hypertension.\nmost likely diagnosis for this patient is hypertension\nThe visit note explicitly states that hypertension is the most likely diagnosis.", "Anemia, Unspecified", "Essential (Primary) Hypertension", "Dehydration" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 3,597 Bytes
2eea151 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | {
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 1.0,
"eval_steps": 500,
"global_step": 17,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.058823529411764705,
"grad_norm": 1.1143922805786133,
"learning_rate": 0.0,
"loss": 0.1007,
"step": 1
},
{
"epoch": 0.11764705882352941,
"grad_norm": 1.2392655611038208,
"learning_rate": 1e-05,
"loss": 0.1131,
"step": 2
},
{
"epoch": 0.17647058823529413,
"grad_norm": 1.21766197681427,
"learning_rate": 2e-05,
"loss": 0.099,
"step": 3
},
{
"epoch": 0.23529411764705882,
"grad_norm": 1.0714961290359497,
"learning_rate": 1.866666666666667e-05,
"loss": 0.0867,
"step": 4
},
{
"epoch": 0.29411764705882354,
"grad_norm": 0.8589863777160645,
"learning_rate": 1.7333333333333336e-05,
"loss": 0.0682,
"step": 5
},
{
"epoch": 0.35294117647058826,
"grad_norm": 0.9731529951095581,
"learning_rate": 1.6000000000000003e-05,
"loss": 0.1019,
"step": 6
},
{
"epoch": 0.4117647058823529,
"grad_norm": 0.7355734705924988,
"learning_rate": 1.4666666666666666e-05,
"loss": 0.0618,
"step": 7
},
{
"epoch": 0.47058823529411764,
"grad_norm": 0.70526123046875,
"learning_rate": 1.3333333333333333e-05,
"loss": 0.0623,
"step": 8
},
{
"epoch": 0.5294117647058824,
"grad_norm": 0.5791162848472595,
"learning_rate": 1.2e-05,
"loss": 0.0564,
"step": 9
},
{
"epoch": 0.5882352941176471,
"grad_norm": 0.6825107336044312,
"learning_rate": 1.0666666666666667e-05,
"loss": 0.0521,
"step": 10
},
{
"epoch": 0.6470588235294118,
"grad_norm": 0.5632421970367432,
"learning_rate": 9.333333333333334e-06,
"loss": 0.0545,
"step": 11
},
{
"epoch": 0.7058823529411765,
"grad_norm": 0.4283078610897064,
"learning_rate": 8.000000000000001e-06,
"loss": 0.0335,
"step": 12
},
{
"epoch": 0.7647058823529411,
"grad_norm": 0.5495983958244324,
"learning_rate": 6.666666666666667e-06,
"loss": 0.0593,
"step": 13
},
{
"epoch": 0.8235294117647058,
"grad_norm": 0.45312389731407166,
"learning_rate": 5.333333333333334e-06,
"loss": 0.0381,
"step": 14
},
{
"epoch": 0.8823529411764706,
"grad_norm": 0.397487610578537,
"learning_rate": 4.000000000000001e-06,
"loss": 0.0308,
"step": 15
},
{
"epoch": 0.9411764705882353,
"grad_norm": 0.5438785552978516,
"learning_rate": 2.666666666666667e-06,
"loss": 0.0487,
"step": 16
},
{
"epoch": 1.0,
"grad_norm": 0.5302333235740662,
"learning_rate": 1.3333333333333334e-06,
"loss": 0.0398,
"step": 17
}
],
"logging_steps": 1,
"max_steps": 17,
"num_input_tokens_seen": 0,
"num_train_epochs": 1,
"save_steps": 100,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 0.0,
"train_batch_size": 16,
"trial_name": null,
"trial_params": null
}
|