Sentence Similarity
sentence-transformers
Safetensors
mpnet
feature-extraction
job-matching
skill-similarity
embeddings
esco
text-embeddings-inference
Run this model with HF Jobs
Run alvperez/skill-sim-model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/alvperez/skill-sim-model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/alvperez/skill-sim-model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use alvperez/skill-sim-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use alvperez/skill-sim-model with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("alvperez/skill-sim-model") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files1234561 unmodified line89101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114---library_name: sentence-transformerspipeline_tag: sentence-similaritytags:- sentence-transformers- feature-extraction1 unmodified line- job-matching- skill-similarity- embeddings---# alvperez/skill-sim-modelThis is a fine-tuned [sentence-transformers](https://www.SBERT.net) model for **skill similarity** and **job matching**. It maps short skill phrases (e.g., `Python`, `Forklift Operation`, `Electrical Wiring`) into a 768-dimensional embedding space, where semantically related skills are closer together.It can be used for:- Matching candidates to job requirements- Measuring similarity between skills- Clustering and grouping skill sets- Resume parsing or job recommendation systems---## 🧪 Usage (Sentence-Transformers)To use this model:```bashpip install -U sentence-transformers``````pythonfrom sentence_transformers import SentenceTransformermodel = SentenceTransformer('alvperez/skill-sim-model')skills = ["Electrical Wiring", "Circuit Troubleshooting", "Machine Learning"]embeddings = model.encode(skills)print(embeddings.shape) # (3, 768)```---## 🧭 Evaluation ResultsThe model was evaluated on a labeled skill similarity dataset using the following metrics:| Metric | Value ||----------------------|---------|| Spearman Correlation | 0.8612 || ROC AUC | 0.9127 |These scores indicate strong alignment with human-labeled skill similarity ratings.---## 🧠 Training DetailsThe model was fine-tuned on a custom skill similarity dataset using `CosineSimilarityLoss`.### **DataLoader**`torch.utils.data.dataloader.DataLoader` of length 409 with parameters:```python{'batch_size': 32, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}```### **Loss**```pythonsentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss```### **Training Parameters**```python{"epochs": 5,"evaluation_steps": 100,"evaluator": "EmbeddingSimilarityEvaluator","max_grad_norm": 1,"optimizer_class": "AdamW","optimizer_params": {"lr": 2e-05},"scheduler": "WarmupLinear","warmup_steps": 100,"weight_decay": 0.01}```---## 🧬 Model Architecture```pythonSentenceTransformer((0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False})(2): Normalize())```---## 📚 Citation & Attribution- Model fine-tuned by [@alvperez](https://huggingface.co/alvperez)- Built with [Sentence-Transformers](https://www.sbert.net/)- Inspired by semantic search and skill-matching use cases12345671 unmodified line9101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117---library_name: sentence-transformerspipeline_tag: sentence-similaritylicense: apache-2.0tags:- sentence-transformers- feature-extraction1 unmodified line- job-matching- skill-similarity- embeddings- esco---# 🛠️ alvperez/skill-sim-model**skill-sim-model** is a fine-tuned [Sentence-Transformers](https://www.sbert.net) checkpoint that maps short *skill phrases* (e.g. `Python`, `Forklift operation`, `Electrical wiring`) into a 768‑D vector space where semantically related skills cluster together.Training pairs come from the public **ESCO** taxonomy plus curated *hard negatives* for job‑matching research.| Use‑case | How to leverage the embeddings ||----------|--------------------------------|| Candidate ↔ vacancy matching | `score = cosine(skill_vec, job_vec)` || Deduplicating skill taxonomies | cluster the vectors || Recruiter query‑expansion | nearest‑neighbour search || Exploratory dashboards | feed to t‑SNE / PCA |---## 🚀 Quick start```bashpip install -U sentence-transformers``````pythonfrom sentence_transformers import SentenceTransformer, utilmodel = SentenceTransformer("alvperez/skill-sim-model")skills = ["Electrical wiring","Circuit troubleshooting","Machine learning"]emb = model.encode(skills, convert_to_tensor=True)print(util.pytorch_cos_sim(emb[0], emb)) # similarity matrix```Need a vanilla 🤗 pipeline?```pythonfrom transformers import pipelinesimilarity = pipeline("sentence-similarity",model="alvperez/skill-sim-model")similarity("forklift operation",["pallet jack", "python"])```---## 📊 Benchmark| Metric | Value ||--------------------------------|-------|| Spearman correlation (2 k pairs) | **0.845** || ROC AUC | **0.988** || MAP@all (*cold‑start*) | **0.232** |> *cold‑start = the system sees only skill strings, no historical interactions.*---## ⚙️ Training recipe (brief)* Base: `sentence-transformers/all-mpnet-base-v2`* Loss: `CosineSimilarityLoss`* Epochs × batch: `5 × 32`* LR / warm‑up: `2 e‑5` / `100` steps* Negatives: random + “hard” pairs from ESCO siblings* Hardware: 1 × A100 40 GB (≈ 45 min)Full code in [`/training_scripts`](training_scripts).---## 🏹 Intended use* **Employment tech** – rank CVs vs. vacancies* **EdTech / reskilling** – detect skill gaps, suggest learning paths* **HR analytics** – normalise noisy skill fields at scale---## ✋ Limitations & bias* Vocabulary dominated by ESCO (English); niche jargon may project poorly.* No explicit fairness constraints; downstream systems should audit (e.g. *Disparate Impact*).* In our tests, a threshold of 0.65 marks a “definitely related” cut‑off; tune for your own precision‑recall needs.---## 🔍 Citation```bibtex@misc{alvperez2025skillsim,title = {Skill-Sim: a Sentence-Transformers model for skill similarity and job matching},author = {Pérez Amado, Álvaro},howpublished = {\url{https://huggingface.co/alvperez/skill-sim-model}},year = {2025}}```---### AcknowledgementsBuilt with 💙 on top of Sentence-Transformers and the public **ESCO** dataset.Feedback & PRs welcome!
README.md+65-62