Cascaded Code Editing: Large-Small Model Collaboration for Effective and Efficient Code Editing
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2026
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866908983229415424 |
|---|---|
| author | Wang, Chaozheng Yang, Zezhou Gao, Shuzheng Gao, Cuiyun Li, Zongjie Li, Yichen Peng, Ting Huang, Hailiang Deng, Yuetang Lyu, Michael R. |
| author_facet | Wang, Chaozheng Yang, Zezhou Gao, Shuzheng Gao, Cuiyun Li, Zongjie Li, Yichen Peng, Ting Huang, Hailiang Deng, Yuetang Lyu, Michael R. |
| contents | Code editing constitutes a fundamental practice in software development, wherein developers modify existing codebases according to natural language requirements. Accurate code editing necessitates a comprehensive understanding of both the existing codebase and the modification requirements. Although large language models (LLMs) have demonstrated promising performance in code editing tasks, they suffer from substantial inefficiency by generating entire modified files that largely consist of unchanged code. While smaller models could potentially address this inefficiency, they typically lack the capacity to effectively comprehend long code contexts required for accurate editing. To ensure both effectiveness and efficiency, we propose to decompose code editing into a two-stage cascade: \textbf{edit sketch generation}, wherein a large model first produces concise sketches representing the requisite modifications (the more challenging phase), and \textbf{edit sketch application}, wherein a smaller model integrates these sketches into the original code to produce the final output edited code (the simpler phase). This cascaded design reduces the number of tokens generated by the large model, as the majority of the output is handled by the smaller, more efficient model, thereby enhancing overall efficiency. However, the effectiveness of this approach is constrained by current small models' limited capabilities in handling long-context scenarios and cross-file dependencies, which are essential for accurate sketch application in real-world codebases. To address these limitations and enhance smaller models' sketch application capabilities, ... |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2604_19201 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Cascaded Code Editing: Large-Small Model Collaboration for Effective and Efficient Code Editing Wang, Chaozheng Yang, Zezhou Gao, Shuzheng Gao, Cuiyun Li, Zongjie Li, Yichen Peng, Ting Huang, Hailiang Deng, Yuetang Lyu, Michael R. Software Engineering Code editing constitutes a fundamental practice in software development, wherein developers modify existing codebases according to natural language requirements. Accurate code editing necessitates a comprehensive understanding of both the existing codebase and the modification requirements. Although large language models (LLMs) have demonstrated promising performance in code editing tasks, they suffer from substantial inefficiency by generating entire modified files that largely consist of unchanged code. While smaller models could potentially address this inefficiency, they typically lack the capacity to effectively comprehend long code contexts required for accurate editing. To ensure both effectiveness and efficiency, we propose to decompose code editing into a two-stage cascade: \textbf{edit sketch generation}, wherein a large model first produces concise sketches representing the requisite modifications (the more challenging phase), and \textbf{edit sketch application}, wherein a smaller model integrates these sketches into the original code to produce the final output edited code (the simpler phase). This cascaded design reduces the number of tokens generated by the large model, as the majority of the output is handled by the smaller, more efficient model, thereby enhancing overall efficiency. However, the effectiveness of this approach is constrained by current small models' limited capabilities in handling long-context scenarios and cross-file dependencies, which are essential for accurate sketch application in real-world codebases. To address these limitations and enhance smaller models' sketch application capabilities, ... |
| title | Cascaded Code Editing: Large-Small Model Collaboration for Effective and Efficient Code Editing |
| topic | Software Engineering |
| url | https://arxiv.org/abs/2604.19201 |