Downloads · 30 days
13
11% of all-time downloads
AaranNihalani/MerakiTagger
MerakiTagger is a text classification model from AaranNihalani. Use it when you need a label for a piece of text. The card lists the license as mit.
Meraki Tagger is a multi-label sentence classifier designed to analyze humanitarian text data. It identifies key themes and actionable insights from reports, interviews, and field notes, tagging sentences with relevan…
Downloads · 30 days
13
11% of all-time downloads
All-time downloads
115
Public
Parameters
435M
3.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.7 GB · 99%
From the Hugging Face model README
Meraki Tagger is a multi-label sentence classifier designed to analyze humanitarian text data. It identifies key themes and actionable insights from reports, interviews, and field notes, tagging sentences with relevant humanitarian sectors and indicators (e.g., Food Security, Health, Protection, Advocacy Achievement).
This model is fine-tuned on a domain-adapted version of microsoft/deberta-v3-large.
You can use the Hugging Face Inference API to query this model directly.
import requests
API_URL = "https://api-inference.huggingface.co/models/AaranNihalani/MerakiTagger"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
output = query({
"inputs": "The refugee camp is facing a severe shortage of clean water.",
})
print(output)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "AaranNihalani/MerakiTagger"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "We need urgent medical supplies for the clinic."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.sigmoid(logits)
# Mapping IDs to labels
id2label = model.config.id2label
# Get labels with > 50% confidence (or use custom thresholds)
for idx, score in enumerate(probs[0]):
if score > 0.5:
print(f"{id2label[idx]}: {score:.4f}")
This model is trained with class-imbalanced data. For optimal performance, it is recommended to use per-label thresholds rather than a global 0.5 cutoff.
A thresholds.json file is included in the model repository containing optimized thresholds for each tag based on validation set F1 maximization.