arXiv · 2411.10656
Precision or Peril: A PoC of Python Code Quality from Quantized Large Language Models
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.
Explore related subjects
Keep this discovery
Eric L. Melin, Adam J. Torek, Nasir U. Eisty, Casey Kennington. 2024-11-16. Precision or Peril: A PoC of Python Code Quality from Quantized Large Language Models. https://arxiv.org/abs/2411.10656
Cite the original work for its findings. Save a collection to share your selection of sources.