Large Language Models (LLMs) have recently become the source of impressive results in code generation, but there are still areas left neglected. Virtually all small and mediumsized LLMs are unable to produce code in P4, the most popular language for programmable dataplanes. Automatically generating dataplane code carries the promise of flexible networks that can quickly adapt to their specific conditions at the lowest level. P4 is structurally simpler than general-purpose languages, but also offers a much smaller corpus of existing programs, thus setting up interesting challenges for deep-learning based code generation. In this paper, we set out to investigate the extent to which current State-of-the-Art LLMs can produce P4 code and we push these boundaries by experimenting with finetuning to produce code generators that are open, robust and use low resources (1B-3B parameters). To evaluate the quality of the generated code, we have developed a novel benchmark for P4 auto-completion tasks. Our results show that fine-tuned models using the specialized dataset outperform ChatGPT 4 and Gemini Ultra, both in terms of compilability and alignment.
No takes yet. Share an insight, caveat, or question.
Dumitru et al. (2024) studied this question.
Synapse has enriched 3 closely related papers on similar clinical questions. Consider them for comparative context: