SeanLee97 commited on
Commit
25966c0
1 Parent(s): c989d89

Add new SentenceTransformer model.

Browse files
Files changed (5) hide show
  1. README.md +124 -38
  2. config.json +3 -3
  3. config_sentence_transformers.json +5 -4
  4. model.safetensors +2 -2
  5. modules.json +14 -0
README.md CHANGED
@@ -1,58 +1,144 @@
1
  ---
2
- license: mit
3
- base_model: WhereIsAI/UAE-Large-V1
 
 
 
4
  tags:
5
- - generated_from_trainer
6
- model-index:
7
- - name: pre-UAE-Medical-Large-V1
8
- results: []
9
  ---
10
 
11
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
- should probably proofread and complete it, then remove this comment. -->
13
 
14
- [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="200" height="32"/>]()
15
- # pre-UAE-Medical-Large-V1
16
 
17
- This model is a fine-tuned version of [WhereIsAI/UAE-Large-V1](https://huggingface.co/WhereIsAI/UAE-Large-V1) on an unknown dataset.
18
 
19
- ## Model description
 
 
 
 
 
 
 
 
20
 
21
- More information needed
22
 
23
- ## Intended uses & limitations
 
 
24
 
25
- More information needed
26
 
27
- ## Training and evaluation data
 
 
 
 
 
28
 
29
- More information needed
30
 
31
- ## Training procedure
32
 
33
- ### Training hyperparameters
34
 
35
- The following hyperparameters were used during training:
36
- - learning_rate: 1e-06
37
- - train_batch_size: 32
38
- - eval_batch_size: 8
39
- - seed: 42
40
- - distributed_type: multi-GPU
41
- - num_devices: 2
42
- - total_train_batch_size: 64
43
- - total_eval_batch_size: 16
44
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
- - lr_scheduler_type: linear
46
- - lr_scheduler_warmup_steps: 50
47
- - num_epochs: 1
48
 
49
- ### Training results
 
 
50
 
 
 
 
 
 
 
 
 
 
 
 
51
 
 
 
 
 
 
52
 
53
- ### Framework versions
 
54
 
55
- - Transformers 4.42.3
56
- - Pytorch 2.3.0+cu121
57
- - Datasets 2.19.1
58
- - Tokenizers 0.19.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: WhereIsAI/pre-UAE-Medical-Large-V1
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ pipeline_tag: sentence-similarity
7
  tags:
8
+ - sentence-transformers
9
+ - sentence-similarity
10
+ - feature-extraction
11
+ widget: []
12
  ---
13
 
14
+ # SentenceTransformer based on WhereIsAI/pre-UAE-Medical-Large-V1
 
15
 
16
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [WhereIsAI/pre-UAE-Medical-Large-V1](https://huggingface.co/WhereIsAI/pre-UAE-Medical-Large-V1). 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.
 
17
 
18
+ ## Model Details
19
 
20
+ ### Model Description
21
+ - **Model Type:** Sentence Transformer
22
+ - **Base model:** [WhereIsAI/pre-UAE-Medical-Large-V1](https://huggingface.co/WhereIsAI/pre-UAE-Medical-Large-V1) <!-- at revision c989d8965d489e9a6e873eabce06e6ef6f2a0188 -->
23
+ - **Maximum Sequence Length:** 512 tokens
24
+ - **Output Dimensionality:** 1024 tokens
25
+ - **Similarity Function:** Cosine Similarity
26
+ <!-- - **Training Dataset:** Unknown -->
27
+ <!-- - **Language:** Unknown -->
28
+ <!-- - **License:** Unknown -->
29
 
30
+ ### Model Sources
31
 
32
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
33
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
34
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
35
 
36
+ ### Full Model Architecture
37
 
38
+ ```
39
+ SentenceTransformer(
40
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
41
+ (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})
42
+ )
43
+ ```
44
 
45
+ ## Usage
46
 
47
+ ### Direct Usage (Sentence Transformers)
48
 
49
+ First install the Sentence Transformers library:
50
 
51
+ ```bash
52
+ pip install -U sentence-transformers
53
+ ```
 
 
 
 
 
 
 
 
 
 
54
 
55
+ Then you can load this model and run inference.
56
+ ```python
57
+ from sentence_transformers import SentenceTransformer
58
 
59
+ # Download from the 🤗 Hub
60
+ model = SentenceTransformer("WhereIsAI/pre-UAE-Medical-Large-V1")
61
+ # Run inference
62
+ sentences = [
63
+ 'The weather is lovely today.',
64
+ "It's so sunny outside!",
65
+ 'He drove to the stadium.',
66
+ ]
67
+ embeddings = model.encode(sentences)
68
+ print(embeddings.shape)
69
+ # [3, 1024]
70
 
71
+ # Get the similarity scores for the embeddings
72
+ similarities = model.similarity(embeddings, embeddings)
73
+ print(similarities.shape)
74
+ # [3, 3]
75
+ ```
76
 
77
+ <!--
78
+ ### Direct Usage (Transformers)
79
 
80
+ <details><summary>Click to see the direct usage in Transformers</summary>
81
+
82
+ </details>
83
+ -->
84
+
85
+ <!--
86
+ ### Downstream Usage (Sentence Transformers)
87
+
88
+ You can finetune this model on your own dataset.
89
+
90
+ <details><summary>Click to expand</summary>
91
+
92
+ </details>
93
+ -->
94
+
95
+ <!--
96
+ ### Out-of-Scope Use
97
+
98
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
99
+ -->
100
+
101
+ <!--
102
+ ## Bias, Risks and Limitations
103
+
104
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
105
+ -->
106
+
107
+ <!--
108
+ ### Recommendations
109
+
110
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
111
+ -->
112
+
113
+ ## Training Details
114
+
115
+ ### Framework Versions
116
+ - Python: 3.10.12
117
+ - Sentence Transformers: 3.0.1
118
+ - Transformers: 4.42.3
119
+ - PyTorch: 2.3.0+cu121
120
+ - Accelerate: 0.30.1
121
+ - Datasets: 2.19.1
122
+ - Tokenizers: 0.19.1
123
+
124
+ ## Citation
125
+
126
+ ### BibTeX
127
+
128
+ <!--
129
+ ## Glossary
130
+
131
+ *Clearly define terms in order to be accessible across audiences.*
132
+ -->
133
+
134
+ <!--
135
+ ## Model Card Authors
136
+
137
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
138
+ -->
139
+
140
+ <!--
141
+ ## Model Card Contact
142
+
143
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
144
+ -->
config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "_name_or_path": "WhereIsAI/UAE-Large-V1",
3
  "architectures": [
4
- "BertForMaskedLM"
5
  ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
@@ -18,7 +18,7 @@
18
  "num_hidden_layers": 24,
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
- "torch_dtype": "float32",
22
  "transformers_version": "4.42.3",
23
  "type_vocab_size": 2,
24
  "use_cache": false,
 
1
  {
2
+ "_name_or_path": "WhereIsAI/pre-UAE-Medical-Large-V1",
3
  "architectures": [
4
+ "BertModel"
5
  ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
 
18
  "num_hidden_layers": 24,
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
+ "torch_dtype": "float16",
22
  "transformers_version": "4.42.3",
23
  "type_vocab_size": 2,
24
  "use_cache": false,
config_sentence_transformers.json CHANGED
@@ -1,9 +1,10 @@
1
  {
2
  "__version__": {
3
- "sentence_transformers": "2.5.1",
4
- "transformers": "4.37.0",
5
- "pytorch": "2.1.0+cu121"
6
  },
7
  "prompts": {},
8
- "default_prompt_name": null
 
9
  }
 
1
  {
2
  "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.42.3",
5
+ "pytorch": "2.3.0+cu121"
6
  },
7
  "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ddba6fbf557171bcf83b02d009ef0b12c68f8778f08b0ee545f2cfd556a2c334
3
- size 1340745016
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:790f6e90679346a3155d57a008e8ac4d3efb79c43123f6573bbea0c8bad1cec2
3
+ size 670328392
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]