Large language models (LLMs) have demonstrated strong capabilities in generating executable code from natural language descriptions. However, general-purpose models often struggle in specialized programming contexts where domain-specific libraries, APIs, or conventions must be used. Customizing smaller open-source models offers a cost-effective alternative to relying on large proprietary systems. In this work, we investigate how smaller language models can be adapted for domain-specific code generation using synthetic datasets. We construct datasets of programming exercises across three domains within the Python ecosystem: general Python programming, Scikit-learn machine learning workflows, and OpenCV-based computer vision tasks. Using these datasets, we evaluate three customization strategies: few-shot prompting, retrieval-augmented generation (RAG), and parameter-efficient fine-tuning using Low-Rank Adaptation (LoRA). Performance is evaluated using both benchmark-based metrics and similarity-based metrics that measure alignment with domain-specific code. Our results show that prompting-based approaches such as few-shot learning and RAG can improve domain relevance in a cost-effective manner, although their impact on benchmark accuracy is limited. In contrast, LoRA-based fine-tuning consistently achieves higher accuracy and stronger domain alignment across most tasks. These findings highlight practical trade-offs between flexibility, computational cost, and performance when adapting smaller language models for specialized programming tasks.
Pruning General Large Language Models into Customized Expert Models
National University of Singapore(国立新加坡大学);Nanyang Technological University(南洋理工大学);DAMO Academy, Alibaba Group(阿里达摩院);MiroMind;Singapore University of Technology and Design(新加坡科技设计大学)
POSTA: A Go-to Framework for Customized Artistic Poster Generation
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));The Chinese University of Hong Kong(香港中文大学);National University of Singapore(新加坡国立大学);The Hong Kong University of Science and Technology(香港科技大学)
DreamAudio: Customized Text-to-Audio Generation with Diffusion Models
School of Computer Science and Electronic Engineering, University of Surrey(Surrey大学计算机科学与电子工程学院);Department of Informatics, King’s College London(伦敦国王学院信息学院);Seed Group, ByteDance Inc.(字节跳动Seed团队)
Sketch and Customize: A Counterfactual Story Generator
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Tencent AI Lab(腾讯人工智能实验室)