Views
No views yet
| Property | Value |
|---|---|
| Parameters | 596M |
| Layers | 28 |
| Precision | bfloat16 |
| Output | P("yes") in [0, 1] |
transformers>=4.56 (the dtype= argument was named torch_dtype=
before that).yes and no logits at the final position.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4MODEL = "EverMind-AI/skillcorpus-reranker-0.6b"
5tok = AutoTokenizer.from_pretrained(MODEL, padding_side="left")
6model = AutoModelForCausalLM.from_pretrained(MODEL, dtype=torch.bfloat16).cuda().eval()
7
8PREFIX = ('<|im_start|>system\nJudge whether the Document meets the requirements '
9 'based on the Query and the Instruct provided. Note that the answer can '
10 'only be "yes" or "no".<|im_end|>\n<|im_start|>user\n')
11SUFFIX = '<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n'
12
13YES, NO = tok.convert_tokens_to_ids("yes"), tok.convert_tokens_to_ids("no")
14
15
16def score(pairs, max_length=4096):
17 prompts = [PREFIX + p + SUFFIX for p in pairs]
18 enc = tok(prompts, padding=True, truncation=True,
19 max_length=max_length, return_tensors="pt").to(model.device)
20 with torch.no_grad():
21 logits = model(**enc).logits[:, -1, :]
22 pair = torch.stack([logits[:, NO], logits[:, YES]], dim=-1)
23 return torch.softmax(pair, dim=-1)[:, 1].float().tolist()
24
25
26INSTRUCT = ("Given a task description, judge whether the skill document "
27 "is relevant and useful for completing the task")
28
29
30def pair(task, name, description, body):
31 return (f"<Instruct>: {INSTRUCT}\n\n"
32 f"<Query>: {task}\n\n"
33 f"<Document>: {name} | {description} | {body}")
34
35
36task = "resolve conflicts after a git merge"
37print(score([
38 pair(task, "resolve-conflicts", "Resolve git merge conflicts.", "..."),
39 pair(task, "sourdough", "Bake sourdough bread.", "..."),
40]))
41# -> [0.97, 0.01]PREFIX / SUFFIX template, since the score is
read off the final-position logits, and the <Instruct> / <Query> /
<Document> layout with blank lines between the parts. Truncate the document
body, not the template.chat_template.jinja reproduces exactly the string built above, so you can let
the tokenizer assemble it instead. It reads three roles — system carries the
instruction (omit it to get the default shown above), query the task, and
document the skill:1prompt = tok.apply_chat_template([
2 {"role": "system", "content": INSTRUCT},
3 {"role": "query", "content": task},
4 {"role": "document", "content": "resolve-conflicts | Resolve git merge conflicts. | ..."},
5], tokenize=False)max_length, each field was cut to a fixed number of
characters before the prompt was assembled. Matching this keeps inference
inputs on the same distribution as training:| field | limit |
|---|---|
skill description | 500 chars |
skill body | 2,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}