Run this model with HF Jobs

Run ruSpamModels/ruSpam_big on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/ruSpamModels/ruSpam_big. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ruSpamModels/ruSpam_big on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

You need to agree to share your Hugging Face 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
15
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