prathameshssss1/funnel-models - Comment analysis model suite
2 min read
This repository contains a family of fine-tuned models based on MuRIL (Google's multilingual language model) built to automatically filter and tag social media comments on Instagram and Facebook in Marathi, Hindi, and English. The models evaluate comment usefulness, determine sentiment toward the post's author or competitors, and identify real public issues and citizen complaints. These solutions run locally on a CPU or GPU, saving budget on heavy language model API calls. This package will benefit developers building public reaction monitoring and social media analytics systems.
Key features
- Base model: All components are built on
google/muril-base-cased. - Noise filtering: Classification of comments into four usefulness levels ranging from spam to reasoned complaints.
- Position analysis: Determining commenters' attitudes toward politicians, competitors, and key issues.
- Issue detection: A separate classifier and logistic regression for finding real citizen complaints.
What you can do
- Comment evaluation: Run filtering on incoming messages for spam and content to enable further analysis.
- Sentiment analysis: Determine user attitudes toward the publication author and mentioned opponents.
- Complaint monitoring: Extract real problems and citizen demands from the general stream of social media feedback.
Example
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
d = "local_models/muril_B4"
tok = AutoTokenizer.from_pretrained(d)
model = AutoModelForSequenceClassification.from_pretrained(d).eval()
enc = tok(["Great work!"], ["Caption text"], truncation="longest_first",
max_length=256, padding=True, return_tensors="pt")
with torch.no_grad():
p = model(**enc).logits.softmax(-1)[0]
label = ["NOISE", "LOW", "MEDIUM", "HIGH"][p.argmax()]Read more
Details• Model 1 (`muril_B4`): test macro-F1 is 0.687, trained on 10,000 labeled comments.
• Model 2 (`muril_tasks_b4_silver`): three classification heads, average validation macro-F1 is 0.713.
• Model 3 (`pain-points/muril-stage3`): test macro-F1 is 0.508 with precision 0.603.
• Model 4 (`is_problem_head.joblib`): logistic regression with 769 parameters based on scikit-learn 1.8.0.
• Limitations: models are trained on comments from Maharashtra politician pages and may show poorer performance in other regions.










Comments