English

Precision or Peril: A PoC of Python Code Quality from Quantized Large Language Models

Software Engineering 2026-04-06 v2

Abstract

Context: Large Language Models (LLMs) like GPT-5 and LLaMA-405b exhibit advanced code generation abilities, but their deployment demands substantial computation resources and energy. Quantization can reduce memory footprint and hardware requirements, yet may degrade code quality. Objective: This study investigates code generation performance of smaller LLMs, examines the effect of quantization, and identifies common code quality issues as a proof of concepts (PoC). Method: Four open-source LLMs are evaluated on Python benchmarks using code similarity metrics, with an analysis on 8-bit and 4-bit quantization, alongside static code quality assessment. Results: While smaller LLMs can generate functional code, benchmark performance is limited. Quantization impacts are variable, and generated code exhibits quality and maintainability concerns. Conclusions: LLM-generated code should be carefully validated before integration into software projects.

Keywords

Cite

@article{arxiv.2411.10656,
  title  = {Precision or Peril: A PoC of Python Code Quality from Quantized Large Language Models},
  author = {Eric L. Melin and Adam J. Torek and Nasir U. Eisty and Casey Kennington},
  journal= {arXiv preprint arXiv:2411.10656},
  year   = {2026}
}
R2 v1 2026-06-28T20:02:02.247Z