README / README.md
Thibault Goehringer
Update classes
29eee66
|
raw
history blame
5.31 kB
metadata
title: README
emoji: πŸ‘
colorFrom: orange
colorTo: indigo
sdk: static
pinned: false
CALM Logo

CALM: Collaborative Arabic Language Model

The CALM project is joint effort lead by NCAI in collaboration with Yandex, HuggingFace and UW to train an Arabic language model with volunteers from around the globe. The project is an adaptation of the framework proposed at the NeurIPS 2021 demonstration: Training Transformers Together.

One of the main obstacles facing many researchers in the Arabic NLP community is the lack of computing resources that are needed for training large models. Models with leading performane on Arabic NLP tasks, such as AraBERT, CamelBERT, AraELECTRA, and QARiB, took days to train on TPUs. In the spirit of democratization of AI and community enabling, a core value at NCAI, CALM aims to demonstrate the effectiveness of collaborative training and form a community of volunteers for ANLP researchers with basic level cloud GPUs who wish to train their own models collaboratively.

CALM trains a single BERT model on a dataset that combines MSA, Oscar and Arabic Wikipedia, and dialectal data for the gulf region from existing open source datasets. Each volunteer GPU trains the model locally at its own pace on a portion of the dataset while another portion is being streamed in the background to reduces local memory consumption. Computing the gradients and aggregating them is performed in a distributed manner, based on the computing abilities of each participating volunteer. Details of the distributed training process are further described in the paper Deep Learning in Open Collaborations.

How to participate in training?

To join the collaborative training, all you have to do is to keep a notebook running for at least 15 minutes, you're free to close it after that and join again in another time. There are few steps before running the notebook:

  • πŸ‘‰ Create an account on Huggingface.
  • πŸ‘‰ Join the NCAI-CALM Organization on Huggingface through the invitation link shared with you by email.
  • πŸ‘‰ Get your Access Token, it's later required in the notebook.

How to get my Huggingface Access Token

  • πŸ‘‰ Go to your HF account.
  • πŸ‘‰ Go to Settings β‡’ Access Tokens.
  • πŸ‘‰ Generate a new Access Token and enter any name for "what's this token for".
  • πŸ‘‰ Select read role.
  • πŸ‘‰ Copy your access token.
  • πŸ‘‰ In cell 4, it will ask you for an Access Token, paste it there.

Start training

Pick one of the following methods to run the training code.
NOTE: Kaggle gives you around 40 hrs per week of GPU time, so it's preferred over Colab, unless you have Colab Pro or Colab Pro+.

  • πŸ‘‰ (recommended)
  • πŸ‘‰
  • πŸ‘‰ Running locally: If you have additional local computing GPUs, please visit our discord channel for instructions to set it.

Issues or questions?

Feel free to reach us on Discord if you have any questions πŸ™‚