CoolFace
Modelpublic

Ashybalka/xlm-roberta-taxonomy-it-de

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes10downloads
Model Card

XLM-RoBERTa Job Taxonomy — IT (German)

![License](https://opensource.org/licenses/Apache-2.0) ![Language](https://huggingface.co/models?language=de) ![Base](https://huggingface.co/FacebookAI/xlm-roberta-base) ![Categories](https://huggingface.co/Ashybalka/xlm-roberta-taxonomy-it-de)

Fine-tuned xlm-roberta-base for classifying German IT job listings into 14 detailed subcategories.

Part of the JobBlast taxonomy model family — a system for automated classification of German-language job postings.


Test Metrics

MetricValue
Accuracy91.70%
F1 macro90.51%
F1 weighted91.68%

Per-class results

CategoryPrecisionRecallF1Support
Backend Development0.9110.9010.906182
Data Science & Machine Learning0.9000.9470.92357
Database & Data Engineering0.8070.8210.81456
DevOps & Cloud0.9320.9380.935276
ERP & Business Software0.9120.9540.933218
Frontend Development0.9620.8620.90929
Full Stack Development0.8590.9140.88593
Hardware & Embedded0.9550.9330.94445
IT Management & Architecture0.9120.8570.884279
IT Security & Cybersecurity0.9140.9490.93178
IT Support & Helpdesk0.8670.8670.867158
Mobile Development0.8570.8570.8577
QA & Testing0.8970.9720.93336
System Administration0.9540.9450.950509

Repository Structure

Ashybalka/xlm-roberta-taxonomy-it-de/
├── config.json                    # shared — label map, model config
├── tokenizer.json                 # shared — fast tokenizer
├── tokenizer_config.json          # shared
├── sentencepiece.bpe.model        # shared
├── special_tokens_map.json        # shared
├── test_metrics.json              # evaluation results
├── classification_report.txt      # full per-class report
│
├── pytorch/
│   ├── config.json                # needed for from_pretrained(subfolder=)
│   └── model.safetensors          # GPU inference / fine-tuning (~1.1 GB)
│
├── onnx/
│   └── model.onnx                 # CPU fp32 inference (~1.1 GB)
│
└── onnx-int8/
    └── model_quantized.onnx       # CPU INT8 quantized (~280 MB, ~3× faster)

Usage

Input Format

[Job Title] [SEP] [Job Description]
python
text = "DevOps Engineer [SEP] Wir suchen einen erfahrenen DevOps Engineer " \
       "für die Administration unserer Kubernetes-Cluster und CI/CD Pipelines."

PyTorch (GPU / fine-tuning)

python
from transformers import pipeline

clf = pipeline(
    "text-classification",
    model="Ashybalka/xlm-roberta-taxonomy-it-de",
    subfolder="pytorch",
    device=0,  # GPU; -1 for CPU
)

result = clf("DevOps Engineer [SEP] Kubernetes, CI/CD, Monitoring mit Prometheus.")
print(result)
# [{'label': 'DevOps & Cloud', 'score': 0.9821}]

ONNX fp32 (CPU inference)

python
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline

model     = ORTModelForSequenceClassification.from_pretrained(
                "Ashybalka/xlm-roberta-taxonomy-it-de",
                subfolder="onnx"
            )
tokenizer = AutoTokenizer.from_pretrained("Ashybalka/xlm-roberta-taxonomy-it-de")
clf       = pipeline("text-classification", model=model, tokenizer=tokenizer)

result = clf("System Administrator [SEP] Betreuung von Linux-Servern, Netzwerkadministration.")
print(result)
# [{'label': 'System Administration', 'score': 0.9654}]

ONNX INT8 (CPU, lightweight)

python
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline

model     = ORTModelForSequenceClassification.from_pretrained(
                "Ashybalka/xlm-roberta-taxonomy-it-de",
                subfolder="onnx-int8"
            )
tokenizer = AutoTokenizer.from_pretrained("Ashybalka/xlm-roberta-taxonomy-it-de")
clf       = pipeline("text-classification", model=model, tokenizer=tokenizer)

Direct ONNX Runtime (no transformers)

For production FastAPI services or environments without transformers:

python
import json
import numpy as np
import onnxruntime as ort
from huggingface_hub import snapshot_download
from tokenizers import Tokenizer

# download model
path = snapshot_download(
    "Ashybalka/xlm-roberta-taxonomy-it-de",
    allow_patterns=["onnx/model.onnx", "tokenizer.json", "config.json"]
)

# load
session   = ort.InferenceSession(f"{path}/onnx/model.onnx",
                                  providers=["CPUExecutionProvider"])
tokenizer = Tokenizer.from_file(f"{path}/tokenizer.json")
tokenizer.enable_truncation(max_length=510)
tokenizer.no_padding()

with open(f"{path}/config.json") as f:
    labels = [v for _, v in sorted(json.load(f)["id2label"].items(), key=lambda x: int(x[0]))]

vocab   = tokenizer.get_vocab()
bos, eos = vocab["<s>"], vocab["</s>"]

def classify(title: str, description: str) -> dict:
    text     = f"{title} [SEP] {description}"
    encoding = tokenizer.encode(text, add_special_tokens=False)
    ids      = [bos] + encoding.ids + [eos]
    mask     = [1] * len(ids)

    logits = session.run(None, {
        "input_ids":      np.array([ids],  dtype=np.int64),
        "attention_mask": np.array([mask], dtype=np.int64),
    })[0][0]

    exp   = np.exp(logits - logits.max())
    probs = exp / exp.sum()
    idx   = int(np.argmax(probs))

    return {"category": labels[idx], "confidence": round(float(probs[idx]), 4)}

print(classify("Python Developer", "FastAPI, Docker, PostgreSQL, REST API Entwicklung."))
# {'category': 'Backend Development', 'confidence': 0.9543}

Training Details

ParameterValue
Base modelFacebookAI/xlm-roberta-base
Dataset size~20,200 German job listings
LabelingLLM consensus (3-model voting)
Agreement filter2/3 or 3/3 required
Max length512 tokens
Batch size16 (× grad_accum 2 = 32 effective)
Learning rate2e-5
Epochs5 (early stopping patience=2)
Class weightingBalanced + sample weights by agreement
Best checkpointEpoch 4 (val F1 macro)

Limitations

  • Optimized for German job listings only
  • Weakest classes: Database & Data Engineering (F1 0.814), Mobile Development (F1 0.857, only 7 test samples)
  • Cross-functional roles (e.g. "Full Stack DevOps") may be ambiguous between adjacent categories
  • Inputs longer than 512 tokens are truncated — use title + first paragraph for best results

Related Models

ModelCategoriesUse case
xlm-roberta-taxonomy-**main**-de21 top-levelGeneral job classification across all industries
xlm-roberta-taxonomy-it-de (this model)14 IT subcategoriesDetailed IT role classification