Downloads · 30 days
7
6% of all-time downloads
YosefA/adfluence-intent-model
adfluence-intent-model is a text classification model from YosefA. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of Davlan/afro-xlmr-base, a powerful multilingual model with a strong understanding of African languages. It has been specifically trained to classify purchase intent in social media…
Downloads · 30 days
7
6% of all-time downloads
All-time downloads
121
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This model is a fine-tuned version of Davlan/afro-xlmr-base, a powerful multilingual model with a strong understanding of African languages. It has been specifically trained to classify purchase intent in social media comments written in Amharic (Ge'ez script), Romanized Amharic, and mixed Amharic-English (code-switching).
This model was developed for the Adfluence AI project, which aims to evaluate the effectiveness of influencer marketing campaigns in Ethiopia.
It achieves a weighted F1-score of 0.81 on the evaluation set.
The model takes a social media comment as input and outputs a prediction across five categories of purchase intent:
highly_likelylikelyneutralunlikelyhighly_unlikelyThis allows for a nuanced understanding of audience reaction beyond simple positive/negative sentiment, directly measuring the potential for user conversion.
You can use this model directly with the pipeline function from the transformers library.
from transformers import pipeline
# Load the model from the Hub
model_id = "YosefA/adfluence-intent-model"
classifier = pipeline("text-classification", model=model_id)
# --- Example Usage ---
# Example 1: Amharic (Ge'ez Script) - Clear intent
comment_1 = "ዋው በጣም አሪፍ ነው! የት ነው ማግኘት የምችለው?"
# Translation: "Wow, this is great! Where can I find it?"
# Example 2: Mixed Amharic-English - Neutral/Questioning
comment_2 = "Hmm, interesting. Price-u endet new?"
# Translation: "Hmm, interesting. How is the price?"
# Example 3: Romanized Amharic - Negative
comment_3 = "Ene enja minim altemechegnim, quality yelelew neger new."
# Translation: "I don't know, I didn't like it at all, it's a thing with no quality."
results = classifier([comment_1, comment_2, comment_3])
for comment, result in zip([comment_1, comment_2, comment_3], results):
print(f"Comment: {comment}")
print(f"Prediction: {result['label']}, Score: {result['score']:.4f}\n")
# Expected Output:
# Comment: ዋው በጣም አሪፍ ነው! የት ነው ማግኘት የምችለው?
# Prediction: highly_likely, Score: 0.9851
#
# Comment: Hmm, interesting. Price-u endet new?
# Prediction: neutral, Score: 0.9214
#
# Comment: Ene enja minim altemechegnim, quality yelelew neger new.
# Prediction: highly_unlikely, Score: 0.9902
This model is intended to be used as a backend component for the Adfluence AI platform. Its primary purpose is to analyze user comments on social media advertisements (e.g., on Instagram, Facebook, TikTok) to gauge audience purchase intent and provide campaign performance metrics.
This model was fine-tuned on the custom YosefA/Adflufence-ad-comments dataset.
The dataset was created through the following process:
The following hyperparameters were used during training:
learning_rate: 2e-05train_batch_size: 16eval_batch_size: 16seed: 42optimizer: AdamW with betas=(0.9,0.999) and epsilon=1e-08lr_scheduler_type: linearnum_epochs: 3The model achieved its best performance at the end of Epoch 2.
| Training Loss | Epoch | Step | Validation Loss | F1 (Weighted) |
|---|---|---|---|---|
| No log | 1.0 | 160 | 0.5001 | 0.7852 |
| No log | 2.0 | 320 | 0.4316 | 0.8101 |
| No log | 3.0 | 480 | 0.4281 | 0.8063 |