Code LLMs can now teach themselves through self-generated instruction data and test-based validation.
SelfCodeAlign, proposed in this paper, enables code models to improve without relying on bigger teacher models
π https://arxiv.org/abs/2410.24198
π― Original Problem:
Instruction tuning for code LLMs typically relies on expensive human annotations or knowledge distillation from larger proprietary models, which may violate terms of service and limit generalizability.
-----
π§ Solution in this Paper:
β SelfCodeAlign: A pipeline that enables code LLMs to self-align without human annotations/distillation
β Extracts diverse coding concepts from high-quality seed functions in The Stack V1
β Uses base model to generate new coding tasks through in-context learning
β Generates multiple responses per task with test cases for self-validation
β Selects only passing examples for instruction tuning
-----
π‘ Key Insights:
β Models can learn better from their own data distribution than from teacher models
β Explicit test case generation and validation is crucial for self-alignment
β Seed selection and concept extraction improve instruction quality
β Self-alignment can outperform distillation when model gaps aren't huge
-----
π Results:
β Using CodeQwen1.5-7B achieves 67.1 pass@1 on HumanEval+, surpassing CodeLlama-70B-Instruct
β Outperforms models trained with OctoPack across all benchmarks
β Effective across model sizes from 3B to 33B
β Matches/exceeds performance of models using proprietary data










