google/code_x_glue_cc_code_to_code_trans
Viewer โข Updated โข 11.8k โข 672 โข 16
Run lafarizo/code_translation_v1 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_v1. 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_v1 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_v1 with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("lafarizo/code_translation_v1")
model = AutoModelForSeq2SeqLM.from_pretrained("lafarizo/code_translation_v1", device_map="auto")Code Translation from Java to C#
| Metric | Pre-Trained | Fine Tuned |
|---|---|---|
| BLEU Score | 1.18% | 87.82% |
| ROUGE-1 Score | 2.55% | 93.87% |
| ROUGE-2 Score | 0.56% | 90.17% |
| ROUGE-L Score | 2.55% | 63% |
| Exact Match Accuracy | 0% | 0.6800 |
| Mutation-Based Translation Score | 1 | 0.318 |