tkeskin/qwen2.5-coder-1.5b-code-translation
The tkeskin/qwen2.5-coder-1.5b-code-translation model is a 1.5 billion parameter Qwen2.5-Coder-Instruct variant, fine-tuned specifically for high-accuracy code translation between C++, Java, and Python. It leverages a 32768 token context length and significantly improves pass@1 and compile rates for code translation tasks compared to its base model. This model is optimized for converting code logic and structure across these three programming languages, demonstrating a specialized capability in code-to-code translation.
Loading preview...
Model Overview
tkeskin/qwen2.5-coder-1.5b-code-translation is a specialized large language model, fine-tuned from the Qwen/Qwen2.5-Coder-1.5B-Instruct base model. Its primary function is to translate code between C++, Java, and Python while preserving logic and structure. The model was trained using LoRA (Low-Rank Adaptation) on the tkeskin/leetcode-solutions dataset, which consists of directed translation pairs derived from LeetCode solutions.
Key Capabilities & Performance
- Code Translation: Excels at translating source code between C++, Java, and Python.
- Significant Improvement: Achieves a 61.9% pass@1 rate in execution-based evaluation, a +32.6% increase over the base model's 29.3%.
- Enhanced Compile Rate: Demonstrates an 84.5% compile rate, a +24.9% improvement from the base model's 59.6%.
- Context Length: Supports a substantial context window of 32768 tokens.
- Specialization Trade-off: While highly specialized for translation, it maintains general reasoning abilities (MMLU unchanged) but shows regression in general code generation from natural language specifications due to output format specialization.
Intended Use
This model is ideal for developers needing to convert existing code snippets or functions between C++, Java, and Python. It is particularly useful for tasks where maintaining the original logic and structure during translation is critical. The model's strong prior for code structure, inherited from its Qwen2.5-Coder base, makes it robust for programming language transformations.