SynthAI: Synthetic Data Generation Framework
SynthAI is a lightweight framework for generating high-quality synthetic data using LLMs with techniques to ensure diversity and reduce bias.
Features
- 🤖 LLM-Powered Generation: Create realistic synthetic data using language models
- 🧩 Domain Adapters: Specialized components for different data domains (text, tabular, time-series)
- 🔄 Diversity Enhancement: Built-in techniques to increase diversity in generated data
- ⚖️ Bias Reduction: Methods to detect and mitigate bias in synthetic datasets
- 📊 Quality Evaluation: Tools to measure the quality and utility of generated data
- 🚀 Resource Efficiency: Optimized to work with lighter models and minimal compute requirements
Installation
pip install synthai
Quick Start
from synthai import SyntheticDataGenerator
from synthai.generators import TextGenerator
from synthai.evaluators import DiversityEvaluator
# Initialize a generator
generator = SyntheticDataGenerator(
generator_type=TextGenerator(model="distilgpt2"),
domain="customer_reviews"
)
# Generate synthetic data
synthetic_data = generator.generate(
num_samples=100,
prompt_template="Write a {sentiment} review for a {product_type}",
parameters={
"sentiment": ["positive", "negative", "neutral"],
"product_type": ["smartphone", "laptop", "headphones"]
}
)
# Evaluate diversity of the generated data
evaluator = DiversityEvaluator()
diversity_score = evaluator.evaluate(synthetic_data)
print(f"Diversity score: {diversity_score}")
# Save the generated data
generator.save_data(synthetic_data, "synthetic_reviews.csv")
Documentation
For full documentation, visit synthai.readthedocs.io.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
- Biswanath Roul - GitHub
Acknowledgments
Special thanks to the open-source community and the advancements in LLM technology that make this library possible.
Metadata
Release files for synthai-generator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| synthai_generator-0.1.0.tar.gz | 20.8 kB | Without provenance | Details for synthai_generator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| synthai_generator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for synthai_generator-0.1.0-py3-none-any.whl |
Total release size: 45.9 kB
Release files / synthai_generator-0.1.0.tar.gz
| Download URL | synthai_generator-0.1.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b65fba5fabaa590b3eb83836872dcc559679b2cac718bf41fb7594b09136d753
|
|
BLAKE2b-256 checksum How to use checksums |
be1efabf3db4b0b55573e85a72db7bcec12a5b400e9b7dc0b5df6632bafec2ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / synthai_generator-0.1.0-py3-none-any.whl
| Download URL | synthai_generator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0005ae3f0dfb8252cb9672ac8a542b8c71959764d388ba361dbcd54dc4cff607
|
|
BLAKE2b-256 checksum How to use checksums |
87f9c0f1faacf480076bc114ad9e70d61cf4d508401ecdb037685b52f2102b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for synthai-generator 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.