加载中…
加载中…
Binary job-vacancy classifier: detects developer, Data Analyst, or Business Analyst roles (tech) versus other roles (other).
Built on top of cointegrated/rubert-tiny2, a compact BERT model for Russian and English text.
v2 — extends v1 by adding Business Analyst to the positive class and using a longer input context (384 tokens / 2000 chars). Precision improved from 0.880 → 0.922.
The positive class (tech) is defined as:
role_category in TECH_CLASSES AND team_lead == 0
TECH_CLASSES:
Team leads and management roles are intentionally excluded from the positive class.
| id | label |
|---|---|
| 0 | other |
| 1 | tech |
| Metric | Value |
|---|---|
| ROC AUC | 0.9815 |
| Precision @ threshold | 0.9219 |
| Recall @ threshold | 0.9506 |
| Best threshold | 0.8791 |
| Target recall | 0.95 |
| Best epoch | 7 |
Recall by key category (held-out test set):
| Category | Recall |
|---|---|
| Backend | 0.984 |
| Frontend | 1.000 |
| Mobile | 1.000 |
| ML / AI / Data Scientist | 0.976 |
| Data Analyst | 0.916 |
| Business Analyst | 0.895 |
max_length: 384 tokenstitle + " . " + description, description truncated to 2000 characterstech: 0.8791import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL_ID = "AndreiTolmachev/dev_da_roles_1"
THRESHOLD = 0.8791
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID).eval()
def is_tech_role(title: str, description: str = "") -> bool:
text = f"{title.strip()} . {description[:2000].strip()}"
enc = tokenizer(text, truncation=True, max_length=384, return_tensors="pt")
with torch.no_grad():
logits = model(**enc).logits
prob_tech = torch.softmax(logits, dim=-1)[0, 1].item()
return prob_tech >= THRESHOLD
# Developer
print(is_tech_role("Backend Python Developer", "FastAPI, PostgreSQL, Docker, Kubernetes..."))
# Data Analyst
print(is_tech_role("Data Analyst", "SQL, Python, dashboards, product metrics, A/B tests..."))
# Business Analyst
print(is_tech_role("Бизнес аналитик", "Сбор требований, UML, BPMN, работа с командой разработки..."))
# Manager — should return False
print(is_tech_role("Project Manager", "Agile, управление командой, планирование спринтов..."))
BertForSequenceClassificationcointegrated/rubert-tiny2max_position_embeddings: 2048vacancies_labeled.csv), labeled by an LLM pipelinepos_weight = 2.115)lr=2e-5, linear warmup 10%, grad clip 1.0other by design.Hub tag: v2.0-dev-da-ba-r95
Changelog vs v1:
Бизнес аналитик) to positive classmax_length 256→384, description 1200→2000 charslr lowered to 2e-5, batch size 32→24 to accommodate longer sequencesMIT.