YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Load model

from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("heegyu/esconv-xlm-roberta-large")
model = AutoModelForSequenceClassification.from_pretrained("heegyu/esconv-xlm-roberta-large")

Next strategy prediction

example = """usr: Hi
sys[Question]: Hello, how are you today?
usr: I was scolded by my parents yesterday"""
inputs = tokenizer(example, return_tensors="pt")
logits = model(**inputs).logits.softmax(-1)
print(logits)
label = logits.argmax(-1).item()
ESCONV_STRATEGY = [
    "Question",
    "Restatement or Paraphrasing",
    "Reflection of feelings",
    "Self-disclosure",
    "Affirmation and Reassurance",
    "Providing Suggestions",
    "Information",
    "Others"
]
id2label = {i:k for i, k in enumerate(ESCONV_STRATEGY)}
print(id2label[label])

Next strategy prediction (top 3)

example = """usr: Hi
sys[Question]: Hello, how are you today?
usr: I was scolded by my parents yesterday"""
inputs = tokenizer(example, return_tensors="pt")
logits = model(**inputs).logits.softmax(-1)
print(logits)
labels = logits.topk(3)[1][0].tolist()
ESCONV_STRATEGY = [
    "Question",
    "Restatement or Paraphrasing",
    "Reflection of feelings",
    "Self-disclosure",
    "Affirmation and Reassurance",
    "Providing Suggestions",
    "Information",
    "Others"
]
id2label = {i:k for i, k in enumerate(ESCONV_STRATEGY)}
for id in labels:
  print(id2label[id])
Downloads last month
2
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support