asynth
Generate targeted training data to replace expensive LLM API calls with fast, specialized models.
from asynth import synthesize, SynthesisConfig, LiteLLMInferenceConfig
from asynth.configs import GeneralSynthesisParams
from asynth.configs.params.synthesis_params import GeneratedAttribute, TextMessage
from asynth.types.conversation import Role
results = synthesize(SynthesisConfig(
num_samples=10,
inference_config=LiteLLMInferenceConfig(model="openai/gpt-4o-mini"),
strategy_params=GeneralSynthesisParams(
generated_attributes=[
GeneratedAttribute(
id="qa_pair",
instruction_messages=[
TextMessage(role=Role.SYSTEM, content="You are a trivia question writer."),
TextMessage(role=Role.USER, content="Write a trivia Q&A about science."),
],
),
],
),
))
[!NOTE] asynth is the data engine behind amortized — a platform for building and deploying task models that replace expensive LLM API calls with fast, cheap, specialized inference.
Why asynth?
Large models are expensive to run on every request. The alternative: generate synthetic training data, fine-tune a small purpose-built model, and amortize the cost over time.
- Build task models — small models that do one thing well, at a fraction of the cost
- Any LLM as teacher — use GPT-4o, Claude, Gemini, or any LiteLLM provider to generate data — just change the model string
- No heavy dependencies — no torch, no transformers, no CUDA. Installs in seconds
- Production pipeline — attribute sampling, quality checks, conversation planning, and tool-use simulation in a single
synthesize()call
Install
pip install asynth
pip install asynth[hf] # HuggingFace dataset loading
pip install asynth[docs] # Document ingestion (PDF, DOCX)
Requires Python >= 3.11.
Features
Data generation
- Attribute-based synthesis — combine sampled, generated, and transformed attributes in a single pipeline
- Multi-turn conversations — LLM-powered conversation planning with configurable turn counts and per-role personas
- Tool-use simulation — generate agentic conversations with tool calls grounded in environment definitions
Data sources
- Documents — PDF, DOCX, TXT, Markdown, HTML with token-based segmentation
- Datasets — JSONL, CSV, Parquet, TSV, XLSX, and HuggingFace datasets (
hf:org/dataset)
Quality
- Structural validation — role alternation, empty content, tool-call consistency checks before output
- LLM-as-a-Judge —
SimpleJudgeandRuleBasedJudgewith 15 pre-built evaluation configs (code quality, safety, truthfulness, etc.)
Infrastructure
- Provider-agnostic — OpenAI, Anthropic, Google, Azure, Together, Fireworks, Ollama, vLLM via LiteLLM
- Concurrent generation — async LLM calls with configurable concurrency limits
License
Apache 2.0
Metadata
Release files for asynth 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asynth-0.1.10.tar.gz | 400.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asynth-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 507.6 kB
Release files / asynth-0.1.10.tar.gz
| Download URL | asynth-0.1.10.tar.gz |
|---|---|
| Size | 400.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fffb62b2467be31184f56fb91125b57007097b028081607c38ab5b7fd571ad73
|
|
BLAKE2b-256 checksum How to use checksums |
1a7ec8891a2be4bf62e9b2d8ac15d70c09bdbb75414afee2f5702ec5b30a7946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / asynth-0.1.10-py3-none-any.whl
| Download URL | asynth-0.1.10-py3-none-any.whl |
|---|---|
| Size | 106.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42a6aba30061f9c8188ba95600bf81073ad85e634de479224bfcea361047150e
|
|
BLAKE2b-256 checksum How to use checksums |
ad2bd2cc51f8492bafeb20265bd29b013301021942aea962be1c9d973aa05969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency log