Easy Dataset
repository·main·Indexed 12 days ago
https://github.com/conardli/easy-datasetAn application for automating the creation of high-quality fine-tuning and evaluation datasets for Large Language Models (LLMs). It transforms unstructured documents (PDF, Markdown, DOCX, TXT, EPUB) into structured formats such as Single-Turn QA, Multi-Turn Dialogue, and Image QA. Version 1.7.3 supports OpenAI-format APIs, including Ollama, MiniMax, and Zhipu AI, and exports to Alpaca, ShareGPT, and Multilingual-Thinking formats.
What's inside Easy Dataset
- Easy Dataset is a powerful tool designed for creating fine-tuning datasets for Large Language Models (LLMs). It provides an intuitive interface alongside built-in document parsing, intelligent segmentation, data cleaning, and enrichment capabilities. The application can transform domain-specific documents in various formats into high-quality structured datasets suitable for scenarios like model fine-tuning, Retrieval-Augmented Generation (RAG), and model performance evaluation.
Overview of Easy Dataset features
mainEasy Dataset is a tool for building Large Language Model (LLM) datasets. It provides a suite of capabilities for the entire data pipeline:
- Document Processing: Intelligent parsing of PDF, Markdown, DOCX, TXT, and EPUB. Includes text splitting (Markdown structure, recursive, fixed length, code-aware) and data cleaning.
- Data Generation: Automated question generation from text, answer generation with Chain of Thought (COT), and domain label tree construction.
- Dataset Types: Supports Single-Turn QA, Multi-Turn Dialogue, Image QA, and Data Distillation (generating data from topics without documents).
- Model Evaluation: Automated evaluation using a Judge Model, human blind testing (Arena), and generation of various test formats (true/false, multiple-choice, etc.).
- Export & Integration: Exports to Alpaca, ShareGPT, and Multilingual-Thinking formats (JSON/JSONL). Supports LLaMA Factory configuration and direct Hugging Face Hub uploads.
- Model Support: Compatible with any OpenAI-format API, including OpenAI, Ollama (local), MiniMax, Zhipu AI, Alibaba Bailian, and OpenRouter. Supports vision models like Gemini and Claude.
Understand the Easy DataSet Architecture
mainEasy DataSet is an application designed to create fine-tuning datasets for Large Language Models (LLMs). The workflow involves uploading text files, automatically splitting them into segments, generating questions via LLM APIs, and finally producing a complete dataset for fine-tuning.
Core Tech Stack:
- Frontend: Next.js 14 (App Router) with Material-UI (MUI)
- Storage: Local file system (
fs) acting as a simulated database - Language: JavaScript
- Internationalization:
i18nextsupporting English (en) and Simplified Chinese (zh-CN).
Understand the Easy DataSet Project Architecture
mainEasy DataSet is an application designed to create fine-tuning datasets for Large Language Models (LLMs). The workflow involves uploading text files, automatically splitting text into chunks, generating questions from those chunks, and finally producing datasets for model fine-tuning.
Core Workflow
- Project Creation: Users define a project with a name and description. The system initializes a project directory and configuration.
- Document Processing: Users upload Markdown files. The system saves the original file, splits the text into manageable chunks, and generates a table of contents.
- Question Generation: Users select text chunks. The system calls an LLM API to generate questions, which are then stored in a question list and a label tree.
- Dataset Creation: Users select questions for answer generation. The system calls an LLM API to generate answers, saves the resulting dataset, and provides export functionality.
Internationalization (i18n) Setup
mainThe project uses
i18nextandreact-i18nextfor multi-language support.Supported Languages:
- English (
en) - Simplified Chinese (
zh-CN) - Turkish (
tr)
Implementation Details:
- Translations are stored in
locales/{lang}/translation.json. - Configuration is handled via
lib/i18n.js. - Language detection is managed by
i18next-browser-languagedetector.
- English (
Understand the Project Directory Structure
mainThe project follows a Next.js 14 (App Router) structure:
app/: Contains Next.js application routes, includingapi/for backend logic andprojects/[projectId]/for project-specific views.components/: Contains React UI components (e.g.,Navbar.js,CreateProjectDialog.js).lib/: The utility library, specificallylib/db/for data management.locales/: Internationalization (i18n) translation files for English (en), Simplified Chinese (zh-CN), and Turkish (tr).local-db/: The directory where the simulated file-system database resides.
Explore the Project Directory Structure
mainThe project follows a standard Next.js App Router structure with a dedicated library for data management:
app/: Contains Next.js routes, including API routes (api/) and project-specific pages (projects/[projectId]/).components/: React components for the UI (e.g.,Navbar.js,CreateProjectDialog.js).lib/db/: The core data management layer. It uses the file system to manage projects, texts, and datasets.local-db/: The directory where the simulated database (JSON files) is stored.locales/: Internationalization resource files foren,zh-CN, andpt-BR.
easy-dataset/ ├── app/ # Next.js application directory │ ├── api/ # API routes │ │ └── projects/ # Project-related APIs │ ├── projects/ # Project-related pages │ │ └── [projectId]/ # Project detail pages │ └── page.js # Home page ├── components/ # React components ├── lib/ # Utility library │ └── db/ # Database module │ ├── base.js # Base utilities │ ├── projects.js # Project management │ ├── texts.js # Text processing │ ├── datasets.js # Dataset management │ └── index.js # Module exports ├── local-db/ # Local database directory └── locales/ # i18n resource directoryConfigure Supported LLM Providers
mainThe system supports multiple Large Language Model (LLM) providers. For each provider, you can configure the following parameters:
- API Address (Endpoint)
- API Key
- Model Name
Supported Providers:
- Ollama
- OpenAI
- SiliconFlow
- DeepSeek
- Zhipu AI
How the Data Flow Works
mainThe application operates through four primary workflows:
- Project Creation: Users create a project via the home page or navbar. The system initializes the project directory and configuration files, then redirects to the project detail page.
- Document Processing: Users upload Markdown files. The system saves the original file, calls a text-splitting service to generate segments and a directory structure, and displays the results.
- Question Generation: Users select specific text segments. The system calls an LLM API to generate questions, which are then saved to a question list and a tag tree.
- Dataset Generation: Users select questions to generate answers. The system calls an LLM API to produce answers, saves the dataset, and provides an export option.
How the Easy Dataset data workflow works
mainEasy Dataset follows a linear pipeline to transform raw documents into structured LLM fine-tuning datasets:
- Document Upload: Loading files into the system.
- Text Splitting: Using smart chunking to break documents into manageable pieces.
- Question Generation: Using an LLM to generate questions based on text chunks.
- Answer Generation: Using an LLM to generate answers for those questions.
- Dataset Export: Converting the generated pairs into the desired output format.
Build and Run with a Local Dockerfile
mainIf you prefer to build the Docker image locally from the project root:
- Clone the repository and enter the directory.
- Build the image:
docker build -t easy-dataset . - Run the container:
docker run -d \ -p 1717:1717 \ -v ./local-db:/app/local-db \ -v ./prisma:/app/prisma \ --name easy-dataset \ easy-dataset
Note: Mounting
./local-dband./prismais recommended for database consistency. The database initializes automatically on startup.docker build -t easy-dataset . docker run -d \ -p 1717:1717 \ -v ./local-db:/app/local-db \ -v ./prisma:/app/prisma \ --name easy-dataset \ easy-datasetInstall Easy Dataset via NPM
mainTo run Easy Dataset in a development environment using NPM, follow these steps:
- Clone the repository:
git clone https://github.com/ConardLi/easy-dataset.git cd easy-dataset - Install dependencies:
npm install - Build and start the development server:
npm run build npm run start - Access the application at
http://localhost:1717.
git clone https://github.com/ConardLi/easy-dataset.git cd easy-dataset npm install npm run build npm run start- Clone the repository: