Instructions to use lafarizo/code_translation_v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lafarizo/code_translation_v3 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("lafarizo/code_translation_v3") model = AutoModelForSeq2SeqLM.from_pretrained("lafarizo/code_translation_v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| title: "Code Translation v3" | |
| tags: | |
| - code-translation | |
| - code-to-code | |
| - java | |
| - csharp | |
| library_name: "transformers" | |
| datasets: | |
| - google/code_x_glue_cc_code_to_code_trans | |
| widget: | |
| - text: "public class HelloWorld { public static void main(String[] args) { System.out.println(\"Hello, World!\"); } }" | |
| # Code Translation v3 | |
| Code Translation from Java to C# | |
| ### Base Model | |
| - **Repository:** [uclanlp/plbart-base](https://huggingface.co/uclanlp/plbart-base) | |
| ### Dataset | |
| - **Repository:** [google/code_x_glue_cc_code_to_code_trans](https://huggingface.co/datasets/google/code_x_glue_cc_code_to_code_trans) | |
| ### Testing Data | |
| - [Testing Data](https://huggingface.co/datasets/google/code_x_glue_cc_code_to_code_trans/viewer/default/test) | |
| | Metric | Pre-Trained | Fine Tuned | | |
| |------------------------------------------|--------------------|-------------------| | |
| | **BLEU Score** | 38.73% | 85.42% | | |
| | **ROUGE-1 Score** | 60.56% | 91.70% | | |
| | **ROUGE-2 Score** | 46.34% | 87.64% | | |
| | **ROUGE-L Score** | 60.08% | 91.43% | | |
| | **Exact Match Accuracy** | 0% | 56% | | |
| | **Mutation-Based Translation Score** | 0.980 | 0.426 | | |