Text Classification
Transformers
Safetensors
distilbert

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

ruSpam_big

Модель ruSpam_big — нейросеть для определения спама в русскоязычных текстах. Обучена на почти 5 миллионах примеров, показывает высокую точность и устойчивость, но иногда может ошибаться на сообщениях с коммерческой тематикой.

Архитектура

  • Базовая модель: RuBERT
  • Тип задачи: бинарная классификация (СПАМ / НЕ СПАМ)
  • Количество меток: 1 (используется сигмоида для вероятности спама)
  • Фреймворк: PyTorch + Transformers (Hugging Face)

Пример использования

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained("ruSpamModels/ruSpam_big")
model = AutoModelForSequenceClassification.from_pretrained(
    "NeuroSpaceX/ruSpam_big", num_labels=1
).to(device).eval()

text = "Пример сообщения"
encoding = tokenizer(text, padding="max_length", truncation=True, max_length=512, return_tensors="pt")
input_ids = encoding["input_ids"].to(device)
attention_mask = encoding["attention_mask"].to(device)

with torch.no_grad():
    outputs = model(input_ids, attention_mask=attention_mask).logits
    prediction = torch.sigmoid(outputs).cpu().numpy()[0][0]
    is_spam = prediction >= 0.5

print(f"Результат: {'СПАМ' if is_spam else 'НЕ СПАМ'} (уверенность: {prediction:.4f})")

💖 Поддержка проекта

Если проект оказался полезен, вы можете поддержать его развитие:

  • TON:
    UQAvc2APxFcmNg0-K8TJ8ykdkl2GjwveuVfFd8-NOwHGEeqv

  • Рубли (Telegram):
    Перейдите по старт-ссылке бота
    👉 @ModProtectorBot

Спасибо за поддержку ❤️

Downloads last month
100
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ruSpamModels/ruSpam_big

Space using ruSpamModels/ruSpam_big 1