/ Модель

Характеристики

Лицензия
Apache 2.0
Базовая модель
laya
Опубликована
28 сен 2026

laya-fa-support

Классификация текстаТекст → label

Дообученная модель классифицирует персидские обращения в поддержку по четырём направлениям: оплата, технические проблемы, отмена и прочие вопросы.

0скачиваний за 30 дней9лайковвеса обновлены28 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

laya-fa-support — модель классификации персидских обращений в службу поддержки, дообученная Ali Jahani на многоязычном чекпойнте Laya. Она относит сообщение к одному из четырёх отделов: billing, technical, cancel или other, выдавая вероятности для вариантов без генерации текста. Для классификации используется mmBERT-base с 322 млн параметров; дообучены голова принятия решений и последние четыре слоя энкодера, токеновые эмбеддинги заморожены.

Модель предназначена для маршрутизации персидских обращений в службу поддержки. README сообщает о тестировании на синтетическом наборе из 64 сообщений: точность выросла с 56,2% до 79,7% при инструкциях на персидском и с 64,1% до 68,8% при инструкциях на английском. Лучше работают подробные описания вариантов и инструкции на персидском; модель также принимает разговорный персидский, Finglish и смешанный с английским текст. Лицензия — Apache-2.0.

Результаты ограничены небольшим синтетическим тестовым набором, созданным похожим способом на обучающие данные, поэтому качество на реальных обращениях может быть ниже. Модель чувствительна к формулировкам вариантов, а калибровка уверенности основана лишь на 160 строках; перед использованием вероятностей для принятия решений нужна проверка на собственных данных. Другие задачи Laya и другие языки для этой версии не оценивались.

Сценарии применения

  • распределение персидских обращений между отделами поддержки
  • выявление вопросов по оплате и счетам
  • маршрутизация сообщений о технических проблемах
  • выявление запросов на отмену услуги или аккаунта
  • классификация прочих обращений в службу поддержки

Ограничения

Оценка проведена на небольшом синтетическом наборе из 64 сообщений, поэтому качество на реальном трафике может быть ниже. Результат чувствителен к описанию вариантов; калибровку уверенности следует проверить на собственных данных.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

laya-fa-support

Fine-tuned by Ali Jahani · Telegram: t.me/tarfandoonchannel

A Persian customer-support triage model, fine-tuned from Laya's laya-multilingual checkpoint. It reads a Persian support message and decides which department should handle it (billing, technical, cancel or other) in a single forward pass. It returns a probability for every option and generates no text, so there is nothing to parse and nothing to hallucinate.

Results at a glance

These scores come from the held-out persian_fa benchmark: 64 Persian support messages the model never saw during training, asked with prompts it never saw during training.

PromptBase laya-multilingualThis modelChange
Persian instructions36/64 (56.2%)51/64 (79.7%)+15 cases
English instructions41/64 (64.1%)44/64 (68.8%)+3 cases

Quick start

pip install laya
import laya

agent = laya.load("tarfandoon/laya-fa-support")            # add device="cuda" for a GPU

question = {
    "department": {
        "type": "choice",
        "instructions": "این پیام پشتیبانی باید به کدام بخش ارجاع داده شود؟",
        "criteria": {
            "billing": "پرداخت، کسر وجه، استرداد پول، فاکتور، قیمت و هزینه‌ی اشتراک",
            "technical": "خطا، باگ، کرش، مشکل ورود یا رمز، کندی و قطعی برنامه",
            "cancel": "کاربر می‌خواهد اشتراک را لغو کند، تمدید را متوقف کند یا حساب را ببندد یا حذف کند",
            "other": "هر چیز دیگر: تشکر، پیشنهاد، همکاری، استخدام، سؤال عمومی",
        },
    }
}

result = agent.predict({"message": "سلام، دو بار پول از حسابم کم شده ولی اشتراکم فعال نشده"}, question)
answer = result["answers"]["department"]
print(answer["choice"])              # one of: billing, technical, cancel, other
print(answer["probabilities"])       # probability for every department
print(answer["answer_confidence"])   # calibrated probability of the chosen answer

Many messages at once

messages = ["اپ باز نمیشه", "mikham eshterakam ro laghv konam", "مرسی از پشتیبانی‌تون"]
results = agent.predict_batch([{"message": m} for m in messages], question)
for m, r in zip(messages, results):
    print(r["answers"]["department"]["choice"], "<-", m)

Send uncertain cases to a human

THRESHOLD = 0.6   # choose this on your own labelled data
if answer["answer_confidence"] >= THRESHOLD:
    route_to(answer["choice"])
else:
    send_to_human(answer)

Tips

  • Keep the four option keys (billing, technical, cancel, other) and give every option a full description, like the example above. The wording can change, because the model was trained on several paraphrases in Persian and English. Persian instructions work best for this model (see the results).
  • ⚠️ Do not use one-word descriptions such as "billing": "مالی". In a spot check on 8 new messages, the full prompt above got 7/8 right, while one-word descriptions got 5/8. The one-word version was also confidently wrong: it labelled «اپ باز نمیشه» as cancel with 0.92 confidence.
  • The input can be formal or colloquial Persian, Finglish, or Persian mixed with English words. Arabic ي/ك and missing half-spaces are handled.
  • On a CPU a decision takes roughly 150-200 ms. On a GPU it is much faster.

Full benchmark results: before vs after

Base model: convaiinnovations/laya / multilingual @ 55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851. Scores are from the first of three repeats, and every repeat gave identical predictions. Neither model saw these 64 messages or these two prompts during training.

Persian instructions (choice_fa)

MetricBaseThis modelChange
Accuracy36/6451/64+15
Macro-F10.5130.795
False cancel (would wrongly close an account)42
Missed cancel93
Mean answer confidence0.840.69
ECE (calibration error, lower is better)0.2730.103
FamilyBaseThis modelChange
formal6/88/8+2
colloquial5/87/8+2
finglish4/84/80
orthography4/86/8+2
code_mixed5/88/8+3
negation3/86/8+3
sarcasm_taarof5/86/8+1
digits4/86/8+2
Label (recall)BaseThis model
billing13/1614/16
technical14/1614/16
cancel7/1613/16
other2/1610/16

Base

billingtechnicalcancelother
billing13210
technical11410
cancel1870
other6622

This model

billingtechnicalcancelother
billing14011
technical11410
cancel12130
other42010

English instructions (choice_en)

MetricBaseThis modelChange
Accuracy41/6444/64+3
Macro-F10.6330.685
False cancel (would wrongly close an account)23
Missed cancel66
Mean answer confidence0.820.71
ECE (calibration error, lower is better)0.2500.108
FamilyBaseThis modelChange
formal5/88/8+3
colloquial7/86/8-1
finglish4/85/8+1
orthography5/85/80
code_mixed6/86/80
negation3/84/8+1
sarcasm_taarof6/85/8-1
digits5/85/80
Label (recall)BaseThis model
billing10/1610/16
technical15/1614/16
cancel10/1610/16
other6/1610/16

Base

billingtechnicalcancelother
billing10321
technical11500
cancel06100
other4606

This model

billingtechnicalcancelother
billing10222
technical11410
cancel04102
other33010

Training

Base checkpointlaya-multilingual (mmBERT-base, 322M parameters) @ 55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851
Methodtop mode: decision head + last 4 encoder layers. Token embeddings frozen.
Objectivecross-entropy on the gold option, AdamW, fp16 autocast
Data200 training and 40 dev Persian support messages (50 and 10 per label), all synthetic
Prompts4 paraphrased questions (2 Persian, 2 English), none of them the benchmark prompts
Robustnessoptions shuffled with probability 0.5; random ي/ك, half-space and digit variants
Model selectionbest epoch by dev NLL (epoch 6)
Calibrationone choice temperature fitted on dev (1.27)
Hardwarea single NVIDIA GeForce GTX 1650 (4 GB), about 10 minutes
Softwarelaya 0.3.21, torch 2.14.0+cu126, seed 42

The dev set has 40 messages x 4 training prompts. Dev accuracy went from 0.562 before training to 0.700 at the selected epoch.

EpochTrain lossDev accuracyDev NLL
0 (before)-0.5621.555
11.0770.5810.999
20.8700.6190.917
30.8000.6560.896
40.8000.6630.852
50.7280.7000.839
6 ✅ selected0.7330.7000.810
70.7000.7060.818
80.6390.7060.820

A near-duplicate check (character 3-gram Jaccard < 0.5) guarantees that no training or dev message copies a benchmark message.

Limitations

  • The data is small and synthetic. The training set and the benchmark were drafted the same way, with AI assistance. Real customer traffic will be harder, so expect a smaller gain there than the benchmark shows. Evaluate on your own messages before relying on the model.
  • With Persian instructions, these families did not improve: finglish (4/8).
  • With English instructions, these families did not improve: colloquial (6/8), orthography (5/8), code_mixed (6/8), sarcasm_taarof (5/8), digits (5/8).
  • With English instructions the overall change is small (+3 of 64), which is within noise for 64 cases.
  • It is sensitive to how the options are described. Use descriptive option texts (see Tips). Terse one-word options made it much worse, with high confidence.
  • It is specialised to one 4-way decision. Other Laya tasks and languages were not re-evaluated and may have degraded. Use the original Laya checkpoints for those.
  • Confidence was calibrated on 160 dev rows only. Refit the threshold or temperature on your own data before gating decisions on it.

Links

License

Apache-2.0, the same as the base Laya weights.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · decision

Можно запустить

Подбираем GPU…

Ревизия весов
c01b8da

0 моделей