Update README.md
Browse files
README.md
CHANGED
|
@@ -10,126 +10,157 @@ base_model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
|
| 10 |
widget:
|
| 11 |
- source_sentence: 系统管理员技术员——TS/SCI级别并拥有多项式验证
|
| 12 |
sentences:
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
ICT
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
- source_sentence: 安全运营官
|
| 41 |
sentences:
|
| 42 |
-
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
customer
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
assist emergency services
|
| 65 |
- source_sentence: Empleado de control de COVID
|
| 66 |
sentences:
|
| 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 |
information confidentiality, track key performance indicators
|
| 92 |
- source_sentence: Aerie - Brand Ambassador (Sales Associate) - US
|
| 93 |
sentences:
|
| 94 |
-
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
- source_sentence: 医师——危重症护理——重症监护专家——项目医务总监
|
| 117 |
sentences:
|
| 118 |
-
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
pipeline_tag: sentence-similarity
|
| 134 |
library_name: sentence-transformers
|
| 135 |
co2_eq_emissions:
|
|
@@ -142,6 +173,12 @@ co2_eq_emissions:
|
|
| 142 |
ram_total_size: 83.47684860229492
|
| 143 |
hours_used: 5.34
|
| 144 |
hardware_used: 1 x NVIDIA A100-SXM4-40GB
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
---
|
| 146 |
|
| 147 |
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
|
@@ -189,27 +226,67 @@ First install the Sentence Transformers library:
|
|
| 189 |
pip install -U sentence-transformers
|
| 190 |
```
|
| 191 |
|
| 192 |
-
Then you can load
|
| 193 |
```python
|
|
|
|
|
|
|
|
|
|
| 194 |
from sentence_transformers import SentenceTransformer
|
|
|
|
| 195 |
|
| 196 |
-
#
|
| 197 |
model = SentenceTransformer("TechWolf/JobBERT-v3")
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
]
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
#
|
| 209 |
-
similarities =
|
| 210 |
-
print(similarities
|
| 211 |
-
|
|
|
|
|
|
|
|
|
|
| 212 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
|
| 214 |
<!--
|
| 215 |
### Direct Usage (Transformers)
|
|
|
|
| 10 |
widget:
|
| 11 |
- source_sentence: 系统管理员技术员——TS/SCI级别并拥有多项式验证
|
| 12 |
sentences:
|
| 13 |
+
- >-
|
| 14 |
+
support development of annual budget, create a financial report, report
|
| 15 |
+
analysis results, Microsoft Access, accounting, use presentation software,
|
| 16 |
+
interpret financial statements, synthesise financial information, develop
|
| 17 |
+
vaccines, handle financial overviews of the store, produce statistical
|
| 18 |
+
financial records, develop financial statistics reports, explain accounting
|
| 19 |
+
records, financial analysis, SAP R3, represent the company, examine budgets,
|
| 20 |
+
prepare presentation material, use spreadsheets software, forecast account
|
| 21 |
+
metrics, meet deadlines, prepare financial projections, manage budgets,
|
| 22 |
+
exercise self-control, financial statements
|
| 23 |
+
- >-
|
| 24 |
+
ensure cross-department cooperation, establish customer rapport, improve
|
| 25 |
+
business processes, manage technical security systems, handle incidents,
|
| 26 |
+
maintain ICT system, explain characteristics of computer peripheral
|
| 27 |
+
equipment, gather technical information, collaborate in company's daily
|
| 28 |
+
operations , apply change management, maintain technical equipment,
|
| 29 |
+
communicate with customers, solve technical problems, perform ICT
|
| 30 |
+
troubleshooting, use ICT equipment in maintenance activities, manage major
|
| 31 |
+
incidents, build business relationships, computer engineering, perform
|
| 32 |
+
software recovery testing, identify process improvements, maintain
|
| 33 |
+
relationship with customers, carry out project activities, collaborate in
|
| 34 |
+
the development of marketing strategies, computer technology, technical
|
| 35 |
+
terminology
|
| 36 |
+
- >-
|
| 37 |
+
utilise machine learning, cloud technologies, develop predictive models,
|
| 38 |
+
assess sportive performance, formulate findings , principles of artificial
|
| 39 |
+
intelligence, perform business research, communicate with stakeholders,
|
| 40 |
+
computer engineering, build predictive models, computer science, develop
|
| 41 |
+
automated software tests, analyse business objectives, Agile development,
|
| 42 |
+
cloud monitoring and reporting, provide written content, obtain relevant
|
| 43 |
+
licenses, design prototypes, machine learning, e-learning software
|
| 44 |
+
infrastructure, analyse education system, disseminate results to the
|
| 45 |
+
scientific community, learning technologies, ML (computer programming), task
|
| 46 |
+
algorithmisation
|
| 47 |
- source_sentence: 安全运营官
|
| 48 |
sentences:
|
| 49 |
+
- >-
|
| 50 |
+
deliver outstanding service, manage carriers, direct customers to
|
| 51 |
+
merchandise, improve customer interaction, manage time, support managers,
|
| 52 |
+
assist customers, process customer orders, manage customer service, satisfy
|
| 53 |
+
customers, guarantee customer satisfaction, respond to customers' inquiries
|
| 54 |
+
- >-
|
| 55 |
+
manage several projects, implement operational business plans, identify
|
| 56 |
+
improvement actions, develop strategy to solve problems, manage website,
|
| 57 |
+
carry out project activities, follow reporting procedures, supervise site
|
| 58 |
+
maintenance, adjust priorities, schedule shifts, conduct public
|
| 59 |
+
presentations, motivate others, manage operational budgets, report to the
|
| 60 |
+
team leader, encourage teams for continuous improvement, lead the
|
| 61 |
+
sustainability reporting process, implement sustainable procurement, show an
|
| 62 |
+
exemplary leading role in an organisation, manage manufacturing facilities,
|
| 63 |
+
develop training programmes, develop production line, supply chain
|
| 64 |
+
management, leadership principles, lead a team, coaching techniques
|
| 65 |
+
- >-
|
| 66 |
+
provide emergency supplies, provide first aid, liaise with security
|
| 67 |
+
authorities, apply medical first aid in case of emergency, regulate traffic,
|
| 68 |
+
train security officers, maintain physical fitness, provide protective
|
| 69 |
+
escort, ensure public safety and security, ensure inspections of facilities,
|
| 70 |
+
work in inclement conditions, follow procedures in the event of an alarm,
|
| 71 |
+
set safety and security standards, comply with the principles of
|
| 72 |
+
self-defence, present reports, maintain facility security systems, conduct
|
| 73 |
+
security screenings, types of evaluation , monitor security measures, office
|
| 74 |
+
equipment, escort pedestrians across streets, advise on security staff
|
| 75 |
+
selection, wear appropriate protective gear, work in outdoor conditions,
|
| 76 |
assist emergency services
|
| 77 |
- source_sentence: Empleado de control de COVID
|
| 78 |
sentences:
|
| 79 |
+
- >-
|
| 80 |
+
maintain records of clients' prescriptions, assist people in contaminated
|
| 81 |
+
areas, label samples, maintain museum records, apply social distancing
|
| 82 |
+
protocols, collect biological samples from patients, infection control,
|
| 83 |
+
label medical laboratory samples, disinfect surfaces, maintain customer
|
| 84 |
+
records, ensure health and safety of staff, personal protective equipment,
|
| 85 |
+
remove contaminated materials, store contaminated materials, prepare
|
| 86 |
+
prescription labels, use personal protection equipment
|
| 87 |
+
- >-
|
| 88 |
+
promote organisational communication, provide legal advice, human resource
|
| 89 |
+
management, company policies, perform customer management, business
|
| 90 |
+
processes, ensure compliance with legal requirements, develop communications
|
| 91 |
+
strategies, enforce company values, develop outreach training plans, use
|
| 92 |
+
consulting techniques, develop employment policies, human resources
|
| 93 |
+
department processes, personnel management, identify training needs,
|
| 94 |
+
participate in health personnel training, health and safety in the
|
| 95 |
+
workplace, lead police investigations, ensure compliance with policies,
|
| 96 |
+
prepare compliance documents, perform internal investigations, develop
|
| 97 |
+
employee retention programs, develop corporate training programmes, customer
|
| 98 |
+
relationship management, manage localisation
|
| 99 |
+
- >-
|
| 100 |
+
perform escalation procedure, imprint visionary aspirations into the
|
| 101 |
+
business management, observe confidentiality, impart business plans to
|
| 102 |
+
collaborators, lead a team, human resources department processes, respect
|
| 103 |
+
confidentiality obligations, hire human resources, manage commercial risks,
|
| 104 |
+
develop business plans, communicate with stakeholders, maintain relationship
|
| 105 |
+
with customers, manage several projects, provide improvement strategies,
|
| 106 |
+
manage technical security systems, knowledge management, risk management,
|
| 107 |
+
develop program ideas, perform project management, project management, cope
|
| 108 |
+
with uncertainty, address identified risks, provide performance feedback,
|
| 109 |
information confidentiality, track key performance indicators
|
| 110 |
- source_sentence: Aerie - Brand Ambassador (Sales Associate) - US
|
| 111 |
sentences:
|
| 112 |
+
- >-
|
| 113 |
+
lay bricks, provide first aid, enforce park rules, conflict management, give
|
| 114 |
+
swimming lessons, assist in performing physical exercises, perform park
|
| 115 |
+
safety inspections, assist in the movement of heavy loads, lead a team,
|
| 116 |
+
first aid, supervise pool activities, swim, coach staff for running the
|
| 117 |
+
performance, show an exemplary leading role in an organisation, teach public
|
| 118 |
+
speaking principles, collaborate with coaching team, supervise work,
|
| 119 |
+
calculate stairs rise and run, calculate compensation payments, manage a
|
| 120 |
+
team, information confidentiality
|
| 121 |
+
- >-
|
| 122 |
+
react to events in time-critical environments, operate in a specific field
|
| 123 |
+
of nursing care, clinical science, promote healthy fitness environment, lead
|
| 124 |
+
others, comply with legislation related to health care, maintain a safe,
|
| 125 |
+
hygienic and secure working environment, provide healthcare services to
|
| 126 |
+
patients in specialised medicine, write English, conduct physical
|
| 127 |
+
examinations, leadership principles, use clinical assessment techniques,
|
| 128 |
+
apply context specific clinical competences, conduct health related
|
| 129 |
+
research, conceptualise healthcare user’s needs, assessment processes,
|
| 130 |
+
communicate in healthcare, provide professional care in nursing, nursing
|
| 131 |
+
science, promote health and safety, implement policy in healthcare
|
| 132 |
+
practices, engage with stakeholders, identify problems, respond to changing
|
| 133 |
+
situations in health care, perform resource planning
|
| 134 |
+
- >-
|
| 135 |
+
ensure the privacy of guests, provide customised products, company policies,
|
| 136 |
+
exude enthusiasm during the action sessions, provide customer guidance on
|
| 137 |
+
product selection, collect briefing regarding products, perform multiple
|
| 138 |
+
tasks at the same time, create solutions to problems, respond to visitor
|
| 139 |
+
complaints
|
| 140 |
- source_sentence: 医师——危重症护理——重症监护专家——项目医务总监
|
| 141 |
sentences:
|
| 142 |
+
- >-
|
| 143 |
+
handle incidents, provide technical documentation, coordinate operational
|
| 144 |
+
activities, ensure information security, work in teams, manage manufacturing
|
| 145 |
+
documentation, project configuration management, operate call distribution
|
| 146 |
+
system, maintain computer hardware, apply change management, manage aircraft
|
| 147 |
+
support systems, perform escalation procedure, manage production
|
| 148 |
+
changeovers, maintenance operations, call-centre technologies, manage
|
| 149 |
+
service contracts in the drilling industry, encourage teambuilding, manage
|
| 150 |
+
major incidents, resolve equipment malfunctions, work independently, think
|
| 151 |
+
analytically, manage maintenance operations, maintain plan for continuity of
|
| 152 |
+
operations
|
| 153 |
+
- >-
|
| 154 |
+
develop recycling programs, receive actors' resumes, work in cold
|
| 155 |
+
environments, perform cleaning duties, operate floor cleaning equipment,
|
| 156 |
+
operate forklift
|
| 157 |
+
- >-
|
| 158 |
+
perform technical tasks with great care, supervise medical residents, manage
|
| 159 |
+
a multidisciplinary team involved in patient care, administrative tasks in a
|
| 160 |
+
medical environment, demonstrate technical skills during neurological
|
| 161 |
+
surgery, apply problem solving in social service, intensive care medicine,
|
| 162 |
+
provide comprehensive care for patients with surgical conditions, work in
|
| 163 |
+
teams, solve problems
|
| 164 |
pipeline_tag: sentence-similarity
|
| 165 |
library_name: sentence-transformers
|
| 166 |
co2_eq_emissions:
|
|
|
|
| 173 |
ram_total_size: 83.47684860229492
|
| 174 |
hours_used: 5.34
|
| 175 |
hardware_used: 1 x NVIDIA A100-SXM4-40GB
|
| 176 |
+
license: mit
|
| 177 |
+
language:
|
| 178 |
+
- en
|
| 179 |
+
- es
|
| 180 |
+
- de
|
| 181 |
+
- zh
|
| 182 |
---
|
| 183 |
|
| 184 |
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
|
|
|
| 226 |
pip install -U sentence-transformers
|
| 227 |
```
|
| 228 |
|
| 229 |
+
Then you can load and use the model with the following code:
|
| 230 |
```python
|
| 231 |
+
import torch
|
| 232 |
+
import numpy as np
|
| 233 |
+
from tqdm.auto import tqdm
|
| 234 |
from sentence_transformers import SentenceTransformer
|
| 235 |
+
from sentence_transformers.util import batch_to_device, cos_sim
|
| 236 |
|
| 237 |
+
# Load the model
|
| 238 |
model = SentenceTransformer("TechWolf/JobBERT-v3")
|
| 239 |
+
|
| 240 |
+
def encode_batch(jobbert_model, texts):
|
| 241 |
+
features = jobbert_model.tokenize(texts)
|
| 242 |
+
features = batch_to_device(features, jobbert_model.device)
|
| 243 |
+
features["text_keys"] = ["anchor"]
|
| 244 |
+
with torch.no_grad():
|
| 245 |
+
out_features = jobbert_model.forward(features)
|
| 246 |
+
return out_features["sentence_embedding"].cpu().numpy()
|
| 247 |
+
|
| 248 |
+
def encode(jobbert_model, texts, batch_size: int = 8):
|
| 249 |
+
# Sort texts by length and keep track of original indices
|
| 250 |
+
sorted_indices = np.argsort([len(text) for text in texts])
|
| 251 |
+
sorted_texts = [texts[i] for i in sorted_indices]
|
| 252 |
+
|
| 253 |
+
embeddings = []
|
| 254 |
+
|
| 255 |
+
# Encode in batches
|
| 256 |
+
for i in tqdm(range(0, len(sorted_texts), batch_size)):
|
| 257 |
+
batch = sorted_texts[i:i+batch_size]
|
| 258 |
+
embeddings.append(encode_batch(jobbert_model, batch))
|
| 259 |
+
|
| 260 |
+
# Concatenate embeddings and reorder to original indices
|
| 261 |
+
sorted_embeddings = np.concatenate(embeddings)
|
| 262 |
+
original_order = np.argsort(sorted_indices)
|
| 263 |
+
return sorted_embeddings[original_order]
|
| 264 |
+
|
| 265 |
+
# Example usage
|
| 266 |
+
job_titles = [
|
| 267 |
+
'Software Engineer',
|
| 268 |
+
'高级软件开发人员', # senior software developer
|
| 269 |
+
'Produktmanager', # product manager
|
| 270 |
+
'Científica de datos' # data scientist
|
| 271 |
]
|
| 272 |
+
|
| 273 |
+
# Get embeddings
|
| 274 |
+
embeddings = encode(model, job_titles)
|
| 275 |
+
|
| 276 |
+
# Calculate cosine similarity matrix
|
| 277 |
+
similarities = cos_sim(embeddings, embeddings)
|
| 278 |
+
print(similarities)
|
| 279 |
+
```
|
| 280 |
+
|
| 281 |
+
The output will be a similarity matrix where each value represents the cosine similarity between two job titles:
|
| 282 |
+
|
| 283 |
```
|
| 284 |
+
tensor([[1.0000, 0.8087, 0.4673, 0.5669],
|
| 285 |
+
[0.8087, 1.0000, 0.4428, 0.4968],
|
| 286 |
+
[0.4673, 0.4428, 1.0000, 0.4292],
|
| 287 |
+
[0.5669, 0.4968, 0.4292, 1.0000]])
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
|
| 291 |
<!--
|
| 292 |
### Direct Usage (Transformers)
|