/ Модель

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

Контекст
8 192 токена
Параметры
395 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
von
Опубликована
6 окт 2026

von-transaction-classifier

Классификация без дообученияТекст → label

Англоязычная дообученная модель выбирает категорию личных расходов по описанию транзакции и заданному списку вариантов.

25скачиваний за 30 дней0лайковвеса обновлены6 окт 2026

Бенчмарки

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

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

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

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

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

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

yslahoti/von-transaction-classifier — англоязычная модель для отнесения расходов по банковским и карточным транзакциям к одной из заданных категорий. Это дообученная на базе wfzyx/von модель архитектуры ModernBERT с 394,7 млн параметров и контекстом до 8192 токенов; для работы принимает краткое описание транзакции и фиксированный список текстовых вариантов, затем выбирает категорию за один проход без генерации текста. Разработчик обучал её на записях личного бюджета, дополненных синтетическими примерами; базовая модель распространяется по лицензии Apache-2.0.

На отложенной выборке из 112 транзакций и 108 продавцов точность составила 79,5%, macro-F1 — 0,574. Модель подходит для автоматической категоризации расходов в личном бюджете, но обучена на одном англоязычном наборе и не проверялась на данных других банков или пользователей. Категории кофе и ресторанов пересекаются, а метрики для малых категорий ненадёжны; подтверждённые метки продавцов и правила следует использовать как приоритетные. Для предсказаний нужно сохранять предусмотренные карточкой формулировки вариантов категорий.

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

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

Ограничения

Обучена на одном личном англоязычном журнале расходов и не оценивалась на данных других людей или банков. Категории кофе и ресторанов пересекаются, а показатели по малым категориям основаны на очень небольшом числе примеров; сохраняйте исходные формулировки вариантов и перепроверяйте результат правилами или подтверждёнными метками.

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

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

Открыть на Hugging Face

Von transaction classifier

Fine-tune of wfzyx/von (Apache-2.0, ModernBERT-large option-marker model) for English card and bank spending categories.

The model reads a short transaction state and a fixed list of category descriptions, then picks one category in a single forward pass. Card payments, fees, and cash transfers are not options here. Those stay with rules.

The personal ledger used for the real training rows is not in this repository. synthetic_example.py is the fictional contrast set that was mixed into training.

Held-out results

Same merchant split for every row. Seed 13. The test merchants were not used for training or for choosing the checkpoint. Checkpoint selection used calibration accuracy. Epoch 2 of 4 was kept (calibration accuracy 82.2%). Later epochs fit the training loss harder and did worse on calibration (epoch 4 was 73.3%).

112 test transactions, 108 merchants.

ModelAccuracyMacro-F1Merchant-weighted accuracy
Laya base53.6%0.31753.7%
Laya fine-tuned79.5%0.57478.7%
Von zero-shot, same option text47.3%0.41947.2%
Von fine-tune, real labels only75.9%0.58375.0%
This checkpoint84.8%0.84584.9%

Zero-shot Von with this sharper option text is weaker than the earlier wording, because the new descriptions are less like Von's pretraining. The fine-tune is what makes the wording work.

CategoryTest rowsReal-only recallThis checkpoint
AI & Software250%50%
Coffee, Bakery & Snacks2669%58%
Dining & Takeout5088%98%
Education & Professional10%100%
Entertainment4100%100%
Groceries & Bodega989%100%
Health & Fitness1100%100%
Personal Care & Services20%50%
Rideshare & Taxi3100%100%
Shopping540%80%
Subscriptions & Media250%100%
Public Transit367%67%
Travel425%75%

Coffee recall fell from 69% to 58% when the synthetic dining rows were added. Dining recall rose from 88% to 98%. Several categories have only one to four test rows, so those recalls are thin.

Training took 3.2 minutes on one RTX 3090. The chosen epoch had training loss 0.225.

EpochTrain lossCalibration accuracy
10.77673.3%
20.22582.2%
30.11380.0%
40.03173.3%

Training setup

  • Base weights: wfzyx/von option-marker checkpoint, digit_split false, independent_options true.
  • Loss: softmax cross-entropy plus 0.5 times Brier score, the Von training objective.
  • Optimizer: AdamW. Encoder learning rate 1.5e-5, scorer learning rate 7.5e-5, weight decay 0.01, gradient clip 1.0, bfloat16, no GradScaler.
  • Batch size 8, gradient accumulation 2, 4 epochs, seed 13.
  • Train sampling: inverse square root of merchant support, capped at 3x.
  • Train rows: 1,118, from 466 merchants. That count includes a second copy of each real training row with the issuer label removed, plus 144 fictional rows (72 names, two copies each).
  • Calibration rows: 45. Test rows: 112.

The category decision uses the raw softmax. The temperature in marker_calibration.json comes from the base Von release and was not refit on transactions, so it does not change the chosen category and should not be treated as a calibrated probability for this task.

Option text

Question: What kind of place is this merchant and what was bought there?

Use these descriptions. Changing them changes the model.

iddescription
education_professionalexam, tuition, course, conference, or professional dues, not a bank transfer; e.g. SF Match, SIAM membership
entertainmentmovies, games, concerts, sports, or tickets, not cash from an ATM; e.g. AMC Theatres, Dave & Buster's, Steam
personal_carelaundry, dry cleaning, haircut, barbershop, spa, or bathhouse; e.g. Hercules laundry kiosk, NY Evergreen Cleaners
health_fitnesspharmacy, medical visit, gym or fitness class; e.g. CVS Pharmacy, Vibe Fitness
shoppingclothes, retail stores, online orders, books, toys, skincare or home goods; e.g. Uniqlo, Target, Zara
subscriptionsrecurring music, video, reading, storage or membership subscription; e.g. Spotify, Medium, Google One
ai_softwareAI assistant, coding tool, cloud hosting or domain subscription; e.g. Claude.ai, ChatGPT, Amazon Web Services
travelflights, hotels, car rentals, Amtrak and trip insurance for out-of-town travel; e.g. United, Hyatt Place, Drivo rent-a-car
ridesharea car ride booked through Uber or Lyft, a yellow cab, or a car service to the airport; e.g. Uber trip, Lyft ride
transitsubway or bus fare, commuter rail, ferry or bike share trip; e.g. MTA subway tap, NJ Transit, Citi Bike
coffee_bakerycoffee, tea, bakery, juice bar, smoothie, acai, or ice cream, including a cafe that also sells a sandwich; e.g. Sweetleaf Coffee, Qahwah House, 51st Bakery and Cafe
dininga restaurant meal, takeout, pizza, or drinks bar, not coffee, juice, or a bakery; e.g. Ros Niyom Thai, Hibino, Chipotle
groceriespackaged food from a supermarket, bodega, or convenience store, not a restaurant or cafe; e.g. Evergreen Marketplace, His N Hers Mini Mart, Key Food

State lines, in this order:

merchant: Pine Street Bakery
raw_description: TST* PINE STREET BAKERY
payment_terminal: Toast point-of-sale, used by restaurants and cafes
amount_usd: 9.40
issuer_label: Dining

payment_terminal is omitted when the description has no known card-reader prefix. issuer_label is the bank's own category string. Amounts are positive numbers in dollars.

Synthetic data

synthetic_example.py builds the 144 fictional rows. Run it with python synthetic_example.py.

The pattern is a list of invented merchants, each tied to one category and an amount band. Two draws are kept per name. A few pairs teach a distinction the real labels kept missing: a hotel stay is travel, and a few dollars at that hotel's cafe is coffee. Meal-sized charges at places named cafe or bistro are dining. Bakeries, ice cream, juice, and smoothies are coffee. Supermarkets are groceries. Exam fees and dues are education. Podcast and membership charges are subscriptions. Laundry and barbers are personal care. Vape and clothing shops are shopping. Car-rental charges in the hundreds are travel.

import random

specs = [
    ("TST* PINE STREET BAKERY", "coffee_bakery", "Dining", 6, 16),
    ("PHO SAIGON CAFE", "dining", "Dining", 14, 28),
    ("HARBOR INN HOTEL", "travel", "Lodging", 180, 420),
    ("HARBOR INN LOBBY CAFE", "coffee_bakery", "Lodging", 4, 12),
    ("COUNTY MEDICAL LICENSING EXAM", "education_professional", "Other Services", 200, 800),
    ("GREENLINE MARKET", "groceries", "Merchandise", 12, 80),
]

rng = random.Random(13)
for description, category, bank, low, high in specs:
    for copy in range(2):
        amount = round(rng.uniform(low, high), 2)
        text = description if copy == 0 else f"{description} {rng.randint(2, 9)}"
        row = {"description": text, "amount": amount, "bank_category": bank, "category": category}

Before training, drop any generated name that collides with a calibration or test merchant. The published generator does not include those held-out names.

Load

import json
from huggingface_hub import hf_hub_download
import torch
from von.models.option_marker import OptionMarkerModel

repo = "yslahoti/von-transaction-classifier"
model = OptionMarkerModel(base_model_id=repo, digit_split=False)
state = torch.load(hf_hub_download(repo, "option_marker.pt"), map_location="cpu", weights_only=True)
model.load_state_dict(state, strict=True)
model.eval()

calibration = json.load(open(hf_hub_download(repo, "marker_calibration.json"), encoding="utf-8"))
assert calibration["independent_options"] is True
assert calibration["digit_split"] is False

Pack the state, the question, and the option descriptions with model.pack_sequence, then call model(..., independent_options=True). The argmax of the raw softmax is the category. pip install "von-sdk>=1.3.7" supplies OptionMarkerModel.

Limits

This was trained on one personal English-language ledger plus the fictional rows above. It has not been measured on other banks or other people. Coffee and dining still overlap. Small categories can look perfect or empty because the test set has one or two examples. Confirmed merchant labels and hand-written rules should still override the model.

Acknowledgments

Von is by Victor Hugo Panisa: https://github.com/wfzyx/von

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertModel
Ревизия весов
22790ec

0 моделей