SyncAI.news, a Varaisys broadcasting
StarCoder2-Instruct: Fully Transparent and Permissive Self-Alignment for Code Generation
HF

Hugging Face Blog

· 1 min read

AI LabsHugging Face Blog

StarCoder2-Instruct: Fully Transparent and Permissive Self-Alignment for Code Generation

Instruction tuning is an approach of fine-tuning that gives large language models (LLMs) the capability to follow natural and human-written instructions. However, for programming tasks, most models are tuned on either human-written instructions (which are very expensive) or instructions generated by huge and proprietary LLMs (which may not be permitted). We introduce StarCoder2-15B-Instruct-v0.1, the very first entirely self-aligned code LLM trained with a fully permissive and transparent pipeline. Our open-source pipeline uses StarCoder2-15B to generate thousands of instruction-response pairs, which are then used to fine-tune StarCoder-15B itself without any human annotations or distilled data from huge and proprietary LLMs.

StarCoder2-15B-Instruct achieves a 72.6 HumanEval score, even surpassing the 72.0 score of CodeLlama-70B-Instruct! Further evaluation on LiveCodeBench shows that the self-aligned model is even better than the same model trained on data distilled from GPT-4, implying that an LLM could learn more effectively from data within its own distribution than a shifted distribution from a teacher LLM.

Method

Our data generation pipeline mainly consists of three steps:

  1. Extract high-quality and diverse seed functions from The Stack v1, a huge corpus of permissively licensed source code.
  2. Create diverse and realistic code instructions that incorporate different code concepts present in the seed functions (e.g., data deserialization, list concatenation, and recursion).
  3. For each instruction, generate a high-quality response through execution-guided self-validation.

In the following sections, we will explore each of these aspects in detail.

Collecting seed code snippets

For our seed dataset, we carefully extract all Python functions with docstrings in The Stack V1, infer dependencies required using autoimport, and apply the following filtering rules on all functions:

Self-OSS-Instruct

Eventually, 238k instructions are generated from this process.

Original source

This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.

Read the full story on huggingface.co

Similar News