--- language: ar license: apache-2.0 library_name: peft base_model: UBC-NLP/MARBERT tags: - arabic - dialect-classification - lora --- # HammaLoRAMarBert Advanced Arabic Dialect Classification Model with Complete Training Metrics ![Training Metrics](training_metrics.png) ## Full Training History | epoch | train_loss | eval_loss | train_accuracy | eval_accuracy | f1 | precision | recall | |--------:|-------------:|------------:|-----------------:|----------------:|---------:|------------:|---------:| | 1 | 1.51721 | 1.50726 | 0.670392 | 0.685955 | 0.647908 | 0.695828 | 0.670392 | | 2 | 0.827407 | 0.804686 | 0.779283 | 0.790449 | 0.779526 | 0.787574 | 0.779283 | | 3 | 0.624589 | 0.617633 | 0.815747 | 0.823596 | 0.815815 | 0.818754 | 0.815747 | | 4 | 0.577044 | 0.593563 | 0.822927 | 0.821348 | 0.824907 | 0.835161 | 0.822927 | | 5 | 0.504094 | 0.535676 | 0.839036 | 0.834831 | 0.839583 | 0.842469 | 0.839036 | | 6 | 0.46799 | 0.520281 | 0.849213 | 0.835955 | 0.850536 | 0.855303 | 0.849213 | | 7 | 0.445317 | 0.510596 | 0.854708 | 0.840449 | 0.855552 | 0.858046 | 0.854708 | | 8 | 0.428012 | 0.501261 | 0.858142 | 0.842135 | 0.859003 | 0.862191 | 0.858142 | | 9 | 0.412287 | 0.491676 | 0.864635 | 0.848315 | 0.865268 | 0.868648 | 0.864635 | | 10 | 0.400929 | 0.497091 | 0.868194 | 0.847753 | 0.8693 | 0.872337 | 0.868194 | | 11 | 0.395328 | 0.506237 | 0.868319 | 0.840449 | 0.870433 | 0.87781 | 0.868319 | | 12 | 0.378038 | 0.483877 | 0.874813 | 0.847191 | 0.875232 | 0.877259 | 0.874813 | | 13 | 0.3727 | 0.488525 | 0.874313 | 0.841573 | 0.875207 | 0.878724 | 0.874313 | | 14 | 0.366197 | 0.482607 | 0.878059 | 0.85 | 0.878635 | 0.880364 | 0.878059 | | 15 | 0.365844 | 0.485294 | 0.878247 | 0.851124 | 0.879 | 0.88123 | 0.878247 | ## Label Mapping: {0: 'Egypt', 1: 'Iraq', 2: 'Lebanon', 3: 'Morocco', 4: 'Saudi_Arabia', 5: 'Sudan', 6: 'Tunisia'} ## USAGE Example: ```python from transformers import pipeline classifier = pipeline( "text-classification", model="Hamma-16/HammaLoRAMarBert", device="cuda" if torch.cuda.is_available() else "cpu" ) sample_text = "شلونك اليوم؟" result = classifier(sample_text) print(f"Text: {sample_text}") print(f"Predicted: {result[0]['label']} (confidence: {result[0]['score']:.1%})")