We have open-sourced both our Cangjie(仓颉) monolingual dataset and the Cangjie-Java parallel corpus. These datasets can be found in the data directory. All processed data will be released in the near future.
Model training is divided into two phases: continuous pretraining and instruction fine-tuning.
- The
llm-tuningfolder contains the code for continuous pretraining and instruction fine-tuning of the StarCoder model. - The
t5-finetuningfolder includes the code for instruction fine-tuning of the Code-T5p model. - The
t5-pretrainingfolder contains the code for continuous pretraining of the Code-T5p model.
We evaluate translation results using the BLEU automated metric and Function Equivalence.
- Open the
bash-test/call_bash.ipynbfile; - Change the model_id to the model translation result you want to evaluate. For example, you can use the demo result
starcoder2-3b_cangjie_it_2200_lr1e-05_ebs32provided for easy testing. - Run the notebook for the specified model translation result;
- In the
bash-test/call_bash.ipynbnotebook, you can see the evaluation results of the given demo result.
- the model translation result should be a jsonl file with the following format:
{"src": "...", "pred": "..."} {"src": "...", "pred": "..."} {"src": "...", "pred": "..."} - We also privide a detailed handbook on how to execute the test-based evaluation for Cangjie in English and Chinese on using the evaluation script in the
bash-testfolder.
