Logo Lanfrica

amn-krm/Darija_Seq2Seq_Transformer

Domain:

natural language processing

Record type:

model
Creator:
amn
Host:
Ceci est un repo du projet de traduction anglais -> arabe dialectal marocain # ary_seq2seq EN-ARY NMT school project ## Project Organization ``` ├── LICENSE requirements.txt` │ ├── setup.cfg <- Configuration file for flake8 │ └── ary_seq2seq <- Source code for use in this project. │ ├── __init__.py <- Makes ary_seq2seq a Python module │ ├── config.py <- Store useful variables and configuration │ ├── modeling │ ├── __init__.py | | │ ├── ary_kh.py <- Keras-Hub implementation of the model | | | ├── transformer_torch_ary_spm.py <- Raw Keras implementation of the model | | │ ├── prompt.py <- A small CLI app to play with the pretrained model | | │ └── {colmo,layers}.py <- Support code for custom Keras-Hub layers │ ├── eval.py <- Script used to generate evaluation data | ├── bleu.py <- Script used to compute evaluation scores │ └── dataset.py <- Scripts to download or generate data ``` -------- Tested w/ Python 3.12 (as `tensorflow-text` is not packaged for anything higher at the time of writing). ## Setup the environment The environment expects to be managed via uv. ```bash make create_environment source .venv/bin/activate make requirements ``` NOTE: Downloading the dataset requires to be logged in to HF, and to have accepted the T&C for the `atlasia/Atlaset` dataset. ```bash python ary_seq2seq/dataset.py ``` Training the Hub variant can be started via ```bash python ary_seq2seq/modeling/ary_kh.py [--with-swiglu] ``` ## Inference A pretrained model can be download via ```bash make download model ``` You can then play with it in a CLI app: ```bash python ary_seq2seq/modeling/prompt.py ```