Instructions to use BAKKALIAYOUB/DarijaTranslation-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAKKALIAYOUB/DarijaTranslation-V1 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="BAKKALIAYOUB/DarijaTranslation-V1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("BAKKALIAYOUB/DarijaTranslation-V1") model = AutoModelForMultimodalLM.from_pretrained("BAKKALIAYOUB/DarijaTranslation-V1") - Notebooks
- Google Colab
- Kaggle
Model Card for DarijaTranslation-V1
This model translates text from English to Darija (Moroccan Arabic).
Model Description
This model, designed for translating text from English to Darija (Moroccan Arabic), excels in handling general, everyday language such as greetings ("hi, how are you?"). It accurately translates common phrases and sentences typically encountered in informal communication. Additionally, the model has the capability to conjugate verbs correctly in the context of the translation.
- Developed by: BAKKALI AYOUB
- Model type: Translation
- Language(s) (NLP): English to Darija (Moroccan Arabic)
- Finetuned from model : marefa-nlp/marefa-mt-en-ar
How to Get Started with the Model
Use the code below to get started with the model:
from transformers import pipeline
# Initialize the translation pipeline
pipe = pipeline("translation", model="BAKKALIAYOUB/DarijaTranslation-V1")
# Translate text
translated_text = pipe("putin is the president of russia")
print(translated_text)
Training Details
Training Data
The training data are from multiple source : atlasia/darija-translation, BounharAbdelaziz/English-to-Moroccan-Darija, and other csv file that contain adverbs, adjectives, preposition and nouns translation from english to darija.
Training Hyperparameters
- Training regime: fp16 mixed precision
- Epochs : 6
- Learning rate : 2e-5
- Batch size : 32
Speeds, Sizes, Times
- Hardware : GPU P100 ith 16 GB memory
- Training:
Epoch Training Loss Validation Loss 1 0.398500 0.356238 2 0.330500 0.307416 3 0.297300 0.282857 4 0.276900 0.269981 5 0.263200 0.262747 6 0.256800 0.260168
- Downloads last month
- 4