Edit model card

hausaBERTa

This model is a fine-tuned version of bert-base-cased trained on mangaphd/hausaBERTdatatrain dataset. It achieves the following results on the evaluation set:

  • Train Loss: 0.0151
  • Train Accuracy: 0.9849
  • Epoch: 2

The sentiment fine-tuning was done on Hausa Language.

Model Repository : https://github.com/idimohammed/HausaBERTa

Model description

HausaSentiLex is a pretrained lexicon low resources language model. The model was trained on Hausa Language (Hausa is a Chadic language spoken by the Hausa people in the northern half of Nigeria, Niger, Ghana, Cameroon, Benin and Togo, and the southern half of Niger, Chad and Sudan, with significant minorities in Ivory Coast. It is the most widely spoken language in West Africa, and one of the most widely spoken languages in Africa as a whole). The model has been shown to obtain competitive downstream performances on text classification on trained language

Intended uses & limitations

You can use this model with Transformers for sentiment analysis task in Hausa Language.

Supplementary function

Add the following codes for ease of interpretation

import pandas as pd def sentiment_analysis(text): rs = pipe(text) df = pd.DataFrame(rs) senti=df['label'][0] score=df['score'][0] if senti == 'LABEL_0' and score > 0.5: lb='NEGATIVE' elif senti == 'LABEL_1' and score > 0.5: lb='POSITIVE' else: lb='NEUTRAL' return lb

call sentiment_analysis('Your text here') while using the model

Training hyperparameters

The following hyperparameters were used during training:

  • optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': 5e-06, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
  • training_precision: float32

Training results

Train Loss Train Accuracy Epoch
0.2108 0.9168 0
0.1593 0.9385 1
0.0151 0.9849 2

Framework versions

  • Transformers 4.33.2
  • TensorFlow 2.13.0
  • Datasets 2.14.5
  • Tokenizers 0.13.3
Downloads last month
6
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for mangaphd/HausaBERTa

Finetuned
(1906)
this model

Dataset used to train mangaphd/HausaBERTa