Views
No views yet
| Property | Value |
|---|---|
| Parameters | 596M |
| Hidden size | 1024 (embedding dimension) |
| Layers | 28 |
| Precision | bfloat16 |
| Pooling | last token |
| Normalization | L2 |
transformers>=4.56 (the dtype= argument was named torch_dtype=
before that) or sentence-transformers>=3.0.name | description | body
concatenation. Encode them the way the model was trained or retrieval quality
drops. Embeddings come back L2-normalized, so cosine similarity is a plain dot
product.1import torch
2import torch.nn.functional as F
3from transformers import AutoModel, AutoTokenizer
4
5MODEL = "EverMind-AI/skillcorpus-embedding-0.6b"
6tok = AutoTokenizer.from_pretrained(MODEL, padding_side="left")
7model = AutoModel.from_pretrained(MODEL, dtype=torch.bfloat16).cuda().eval()
8
9QUERY_INSTRUCTION = (
10 "Instruct: Given a task description, retrieve the most relevant "
11 "skill document that would help an agent complete the task\nQuery:"
12)
13
14
15def doc(name, description, body):
16 return f"{name} | {description} | {body}"
17
18
19def last_token_pool(hidden, attention_mask):
20 if attention_mask[:, -1].sum() == attention_mask.shape[0]: # left padding
21 return hidden[:, -1]
22 idx = attention_mask.sum(dim=1) - 1
23 return hidden[torch.arange(hidden.shape[0], device=hidden.device), idx]
24
25
26def embed(texts, max_length=2048):
27 enc = tok(texts, padding=True, truncation=True,
28 max_length=max_length, return_tensors="pt").to(model.device)
29 with torch.no_grad():
30 out = model(**enc).last_hidden_state
31 return F.normalize(last_token_pool(out, enc["attention_mask"]), p=2, dim=1)
32
33
34query = embed([QUERY_INSTRUCTION + "resolve conflicts after a git merge"])
35docs = embed([doc("resolve-conflicts", "Resolve git merge conflicts.", "..."),
36 doc("sourdough", "Bake sourdough bread.", "...")])
37print((query @ docs.T).tolist())
38# -> [[0.75, 0.07]]query prompt), so
this path is equivalent to the code above, up to bf16 noise:1from sentence_transformers import SentenceTransformer
2
3st = SentenceTransformer("EverMind-AI/skillcorpus-embedding-0.6b")
4q = st.encode(["resolve conflicts after a git merge"], prompt_name="query")
5d = st.encode(["resolve-conflicts | Resolve git merge conflicts. | ...",
6 "sourdough | Bake sourdough bread. | ..."])
7print(st.similarity(q, d))prompt_name="query" for tasks and nothing for skill documents — that is
the asymmetry above, applied for you.max_length, each field was cut to a fixed number of
characters before the strings were assembled. Matching this keeps inference
inputs on the same distribution as training:| field | limit |
|---|---|
| task description (after the instruction prefix) | 1,500 chars |
skill description | 500 chars |
skill body | 8,000 chars |
1@article{wang2026skillcorpus,
2 title = {SkillCorpus: Consolidating and Evaluating the Open Skill Ecosystem for Real-World LLM Agents},
3 author = {Wang, Yanze and Yao, Pengfei and Sun, Tianyi and Hu, Chuanrui and Xiao, Yan and Luo, Xiaotian and Han, Yunyun and Chen, Yifan and Sun, Jun and Deng, Yafeng},
4 year = {2026},
5 eprint = {2607.15557},
6 archivePrefix = {arXiv},
7 url = {https://arxiv.org/abs/2607.15557}
8}