1. The Problem: Multi-Task in a PEFT World
Large code models (LCMs) like CodeLlama, DeepSeek-Coder, and Qwen2.5-Coder have made impressive progress on individual code-related tasks, but adapting them to a specific downstream setting still requires fine-tuning. Full fine-tuning is expensive and storage-heavy — one full copy of the model per task — and parameter-efficient fine-tuning (PEFT) methods like QLoRA have emerged as the practical alternative for the single-task case.
Real software engineering work is not single-task. A useful coding assistant generates code from a description, summarizes existing functions, and translates code between languages, often in the same session, and the code it writes has to be maintainable, not just correct. To our knowledge, this is one of the first studies to evaluate both correctness and code quality in a multi-task QLoRA setting. We study QLoRA as one representative method from the LoRA family; we do not test other PEFT families such as adapters or prompt and prefix tuning.
2. What We Did
Two research questions guide the study. RQ1: does one multi-task QLoRA model (MT-QLoRA) lose anything against a separate QLoRA model per task (ST-QLoRA)? RQ2: does it lose anything against multi-task full fine-tuning (MT-FFT)?
The main model family is Qwen2.5-Coder-Instruct at four sizes: 0.5B, 1.5B, 3B, and 7B. To check that the RQ1 results are not tied to one family, we repeated RQ1 on CodeLlama-7B-Instruct with the same data, adapter settings, hyperparameters, and evaluation. Four more models at 3B test how the task mix matters (Section 7).
Datasets
Training and validation data come from CodeXGLUE. For code generation we inverted the Code-to-Text pairs (docstring → code); summarization uses the same pairs in the normal direction; translation uses the CodeXGLUE Java↔C# pairs. For testing, code generation uses CoderEval problems with verified test suites, summarization uses a curated CoderEval subset of long functions (from Crupi et al.), and translation uses the CodeXGLUE test split.
| Task | Language | Train | Validation | Test |
|---|---|---|---|---|
| Code Summarization | Java | 164,923 | 5,183 | 99* |
| Python | 251,820 | 13,914 | 100* | |
| Code Generation | Java | 164,923 | 5,183 | 184* |
| Python | 251,818 | 13,914 | 190* | |
| Code Translation | Java → C# | 10,300 | 500 | 1,000 |
| C# → Java | 10,300 | 500 | 1,000 |
Table 2 in the paper. * CoderEval.
Metrics
- Functional correctness —
pass@1on CoderEval (execution-based) plusCodeBLEUfor code generation;CodeBLEUalone for translation, since the CodeXGLUE translation data has no tests. - Summary similarity —
BLEU,METEOR,ROUGE-L,chrF,BERTScore, andSIDE(Java only). - Non-functional code quality — static analysis with
Lizard(lines of code, tokens, cyclomatic complexity, detection rate),Pylint(Python),PMD(Java),Roslyn(C# syntax errors and maintainability issues), andSonarCloud(security hotspots, reliability, maintainability, cognitive complexity). - LLM-as-a-judge —
GPT-5 Minirates each summary for content adequacy, conciseness, and fluency on a 1–5 scale, five times, and we average the runs. We checked the judge against two human annotators on 200 summaries from the 3B models: Pearson correlation with the mean human score was 0.633 for content adequacy, 0.827 for conciseness, and 0.877 for fluency. The judge scores content adequacy about 0.8 points lower than the humans do, but keeps their ranking.
Paired comparisons use McNemar's test for binary outcomes such as pass@1 and the Wilcoxon signed-rank test for continuous metrics, with Holm-Bonferroni correction.
The next three sections go task by task. Each chart shows all three set-ups, so RQ1 (orange against blue) and RQ2 (orange against green) read off the same figure.
3. Code Generation
Against single-task QLoRA (RQ1). Up to 3B the two are on par: none of the pass@1 differences from 0.5B to 3B is statistically significant in either language. The biggest gap is Java at 1.5B, a 25.5% relative drop for multi-task. At 7B the languages split: multi-task leads on Java and trails on Python. On CodeLlama-7B, Python is a tie and single-task leads on Java, even though CodeLlama's multi-task Java code is cleaner (PMD −20.7%, SonarCloud −20.4%). None of the CodeLlama differences, in any task, is statistically significant, so they show a direction rather than a result.
Against full fine-tuning (RQ2). Multi-task QLoRA has the higher pass@1 everywhere except Java at 1.5B, and the gap grows with size. McNemar tests find no significant difference from 0.5B to 3B, so on correctness the two are at parity there.
Code quality depends on size. In Python, small multi-task models produce more issues: SonarCloud maintainability issues rise from 53 to 90 at 0.5B and from 45 to 72 at 1.5B. At 3B the trend reverses, with 33.8% fewer maintainability issues and 19.3% lower cognitive complexity than single-task. Against full fine-tuning, multi-task QLoRA code is simpler: 32.0% lower cyclomatic complexity in Python at 3B and 6.3% fewer PMD violations in Java over 0.5B–3B.
4. Code Translation
Translation is where multi-task QLoRA struggles. Against single-task QLoRA it comes out ahead only at 1.5B, in both directions; up to 3B the CodeBLEU differences are significant at every size for Java→C#, but only at 0.5B for C#→Java. Against full fine-tuning it trails in five of the six direction-and-size pairs up to 3B; for Java→C# the differences are significant but the effect size is negligible. At 7B it falls far behind both. CodeLlama-7B repeats the pattern: single-task QLoRA wins in both directions.
The quality picture is mixed. From 0.5B to 3B, multi-task C# is 2.3–4.8% shorter than single-task C#, but its Roslyn issues swing from 66.8% fewer at 1.5B to 137.0% more at 3B. In the other direction, multi-task QLoRA's Java at 3B has 69.6% fewer SonarCloud issues than full fine-tuning's (435 vs 1,430).
Why 7B breaks is left open. One candidate the paper names: the trained share of weights is smallest at 7B (Section 6), and translation is by far the smallest part of the training data (about 21K examples against about 416K for each of the other tasks).
5. Code Summarization
The effect depends on the language. Python favors multi-task training at every size, against both alternatives and on CodeLlama (where single-task leads only on ROUGE-L and BERTScore). Java does not: single-task QLoRA is ahead from 1.5B to 3B on almost every metric (multi-task leads again at 7B and on CodeLlama), and against full fine-tuning the winner changes from metric to metric.
The LLM judge shrinks these gaps. For Java it finds no significant difference between multi-task QLoRA and either alternative. For Python, multi-task QLoRA is significantly better on all three dimensions at 1.5B and 3B against single-task, and against full fine-tuning. But the absolute scores stay close: against full fine-tuning, content adequacy barely moves at 0.5B (1.818 vs 1.806) while BLEU roughly doubles, and it is slightly lower for multi-task at 1.5B (1.862 vs 1.894) and 3B (1.938 vs 1.962).
6. Training Cost
The adapter has the same configuration at every size, so the share of trained weights falls as the model grows, and the saving grows with it.
7. What the Task Mix Does
Balanced sampling, where each task gets an equal share, helps Java→C# but costs C#→Java; it also raises Python summarization BLEU from 29.90% to 35.43%. Dropping code generation from the mix breaks translation: most outputs no longer parse, and the static-analysis detection rate falls to 19.8% (Java→C#) and 20.9% (C#→Java). Training generation and translation alone gives the best translation scores among the multi-task mixes and the best Java pass@1 (36.41%).
8. What It Means
Our reading: evaluating multi-task PEFT on functional metrics alone gives an incomplete picture. Static analysis and an LLM judge change it in non-trivial ways, as the generation and summarization results show.