Fuleee/springboot-code-completion-dataset
Spring Boot Code Completion Dataset 概述 这是一个专为 Spring Boot 框架代码补全任务设计的中文优先数据集。通过从 GitHub 上 90 个高质量开源 Spring Boot 项目中提取方法级、类级代码片段及配置文件,构建而成。数据集重点突出 Spring Boot 典型特征(注解驱动、依赖注入、配置绑定等),适用于参数高效微调(PEFT,如 LoRA/QLoRA)下的代码生成研究。 数据集统计 总样本数:81,085 条 训练集:64,868 条 验证集:8,108 条 测试集:8,109 条 优先级 2 样本数(含典型 Spring Boot 特征,如 @RestController、@Service、@Entity 等):19,740 条 优先级 2 占比:24.34% 数据格式(Alpaca 风格) 每条数据为 JSON 对象,包含以下字段: { "instruction":… See the full description on the dataset page: https://huggingface.co/datasets/Fuleee/springboot-code-completion-dataset.
027
1---2license: mit3task_categories:4- text-generation5- fill-mask6language:7- zh8tags:9- java10- spring-boot11- code-completion12- peft13- lora14- qlora15- code-dataset16- instruction-tuning17pretty_name: SpringBoot-Code-Completion-Dataset-zh18size_categories:19- 100K<n<1M20---21# Spring Boot Code Completion Dataset22 23## 概述24这是一个专为 Spring Boot 框架代码补全任务设计的中文优先数据集。通过从 GitHub 上 90 个高质量开源 Spring Boot 项目中提取方法级、类级代码片段及配置文件,构建而成。数据集重点突出 Spring Boot 典型特征(注解驱动、依赖注入、配置绑定等),适用于参数高效微调(PEFT,如 LoRA/QLoRA)下的代码生成研究。25 26## 数据集统计27- **总样本数**:81,085 条 28- **训练集**:64,868 条 29- **验证集**:8,108 条 30- **测试集**:8,109 条 31- **优先级 2 样本数**(含典型 Spring Boot 特征,如 @RestController、@Service、@Entity 等):19,740 条 32- **优先级 2 占比**:24.34% 33 34## 数据格式(Alpaca 风格)35每条数据为 JSON 对象,包含以下字段:36```json37{38 "instruction": "请在Spring Boot框架中完成以下Java代码" 或 "请完成以下Java代码",39 "input": "代码前缀(prefix)",40 "output": "代码补全部分(completion)",41 "source_file": "原始文件路径",42 "priority": 1 或 2 // 2 表示含有 Spring Boot 典型特征43}44提取与清洗流程45 46从 GitHub 采集 90 个典型 Spring Boot 项目47使用 javalang 进行 AST 解析,提取方法/类级代码片段及 application 配置48多维度 Spring Boot 特征检测(注解、接口实现、包路径、类名后缀等)标记 priority49清洗:精确 MD5 去重 + SentenceTransformer + FAISS 相似度去重(阈值 0.95)+ priority 2 优先保护50长度过滤:input > 50 字符,output > 20 字符51划分:80% 训练 / 10% 验证 / 10% 测试52 53使用方式54Pythonfrom datasets import load_dataset55 56dataset = load_dataset("您的用户名/springboot-code-completion-dataset")57# 或指定子集58train = dataset["train"]59许可60本数据集仅限学术研究与非商业用途使用。原始代码来源于 GitHub 开源项目,请遵守各项目原许可协议。61引用62如果在论文中使用,请引用本仓库:63text@misc{唯一2026-springboot-dataset,64 author = {唯一},65 title = {Spring Boot Code Completion Dataset},66 year = {2026},67 publisher = {Hugging Face},68 howpublished = {\url{https://huggingface.co/datasets/您的用户名/springboot-code-completion-dataset}}69}70欢迎反馈与合作!