Views
No views yet
1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer("anonymous-ed-benchmark/SkillRet-Embedding-0.6B", trust_remote_code=True)
4
5query_prompt = "Instruct: Given a skill search query, retrieve relevant skills that match the query\nQuery: "
6
7queries = [
8 query_prompt + "Help me set up a CI/CD pipeline for my Python project"
9]
10skills = [
11 "ci-cd-setup | Configure continuous integration and deployment pipelines ...",
12 "python-debugging | Debug Python applications using pdb and logging ...",
13]
14
15q_emb = model.encode(queries, normalize_embeddings=True)
16s_emb = model.encode(skills, normalize_embeddings=True)
17
18similarities = q_emb @ s_emb.T
19print(similarities)| Epoch | Step | Training Loss | NDCG@15 |
|---|---|---|---|
| 0.15 | 50 | 2.4288 | 0.7802 |
| 0.30 | 100 | 1.9920 | 0.7842 |
| 0.45 | 150 | 1.9758 | 0.7887 |
| 0.60 | 200 | 1.9011 | 0.7865 |
| 0.76 | 250 | 1.9100 | 0.7874 |
| 0.91 | 300 | 1.9412 | 0.7859 |
| 1.0 | 331 | - | 0.7862 |
| Metric | @5 | @10 | @15 |
|---|---|---|---|
| NDCG | 0.753 | 0.777 | 0.786 |
| Recall | 0.791 | 0.852 | 0.880 |
| MRR | 0.823 | 0.827 | 0.828 |
| MAP | 0.698 | 0.713 | 0.718 |
| Precision | 0.253 | 0.138 | 0.096 |
| Accuracy@1 | 0.763 | — | — |