Safetensors
xlm-roberta

Encoder model that predicts a difference score for every token in a text pair. Example prediction:

Text A He
0.020
now
0.028
works
0.218
in
0.060
London
0.443
.
0.006
Text B Er
0.024
lebt
0.062
jetzt
0.023
in
0.040
Berlin
0.344
.
0.005

The model was trained on Wikimatrix pairs that were annotated with GPT 5.6 Terra. The dataset is found here: https://huggingface.co/datasets/ZurichNLP/sensidiff-wikimatrix

Related models

Code for reproducing the example is below. Note that the model was only trained to label the second text. To obtain labels for Text A, you would need to do a second pass with the texts swapped.

from transformers import AutoTokenizer, AutoModelForTokenClassification

model_id = "jvamvas/sensidiff-xlm-r-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)

text_a = "He now works in London."
text_b = "Er lebt jetzt in Berlin."

# The model labels the second text in the input pair.
inputs = tokenizer(text_a, text_b, return_tensors="pt")
scores = model(**inputs).logits[0, :, 0].sigmoid().tolist()

print("| Token | Difference score |")
print("| --- | ---: |")
for token, side, score in zip(inputs.tokens(), inputs.sequence_ids(), scores):
    if side == 1:
        print(f"| {token} | {score:.3f} |")
Downloads last month
44
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ZurichNLP/sensidiff-xlm-r-base

Finetuned
(4,408)
this model

Dataset used to train ZurichNLP/sensidiff-xlm-r-base