SyGra: A Low-Code Framework for LLM and SLM Data Generation
SyGra is a low-code/no-code framework designed to streamline the creation, transformation, and alignment of datasets for Large Language Models (LLMs) and Small Language Models (SLMs). By shifting the focus from writing complex engineering scripts to prompt engineering, SyGra enables teams to rapidly generate high-quality, domain-specific data required for model training and alignment.
Core Capabilities and Data Challenges Solved
SyGra addresses common bottlenecks in the data preparation pipeline by providing flexible workflows for several complex scenarios:
- Dataset Transformation and Augmentation: Converting existing knowledge bases into Q&A formats, transforming simple datasets into complex reasoning tasks, and expanding shallow questions into in-depth, multi-turn, or reasoning-heavy queries.
- Model Alignment Data: Generating preference pairs required for Direct Preference Optimization (DPO) from Supervised Fine-Tuning (SFT) datasets.
- **Domain-Specific Curation: Filtering and curating massive corpora for domain-specific mid-training and automatically removing poor-quality samples through quality filtering.
- Multimodal and Cross-Language Processing: Converting PDFs and images into structured documents for Q&A systems and translating or adapting datasets across different languages (e.g., German to English).
- Context Optimization: Expanding small context chunks into larger-context datasets optimized for Retrieval-Augmented Generation (RAG) pipelines.
- Reasoning Enhancement: Pushing models toward better "thinking tokens" to improve step-by-step problem-solving capabilities.
Technical Architecture and Integration
SyGra is implemented as both a Python library and a comprehensive framework, allowing it to be integrated directly into existing machine learning workflows.
Key Technical Features
- Inference Backend Support: The framework works seamlessly with multiple inference backends, including vLLM, Hugging Face TGI, Triton, and Ollama.
- Low-Code Interface: It reduces the need for heavy engineering effort by providing a plug-and-play approach to dataset creation.
- Flexible Generation: The system is designed to adapt to various use cases, ranging from simple Q&A generation to complex DPO and multi-language tasks.
Impact on Model Development
By automating the heavy lifting of data curation and transformation, SyGra aims to reduce manual effort and accelerate the development cycle for AI models. The framework provides four primary benefits to development teams:
- Accelerated Alignment: Faster preparation of data for SFT, DPO, and RAG pipelines.
- Engineering Efficiency: Reduction in time spent writing custom scripts via plug-and-play workflows.
- Increased Robustness: Improved model performance across domain-specific and complex tasks through better data diversity and structure.
- Reduced Manual Curation: Lowering the overhead of manual data cleaning and labeling.