google/code_x_glue_cc_code_to_code_trans
Viewer โข Updated โข 11.8k โข 712 โข 16
Run lafarizo/code_translation_v3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/lafarizo/code_translation_v3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/lafarizo/code_translation_v3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use lafarizo/code_translation_v3 with Transformers:
# pip install -U transformers accelerate
# 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")Code Translation from Java to C#
| 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 |