DeepFabric
DeepFabric generates synthetic training data for language models and agent evaluations.
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- Repository
- https://github.com/nolabs-ai/deepfabric
- License
- Apache-2.0
- Languages
- Python
- Maintainer
- nolabs-ai
- Homepage
- http://docs.deepfabric.dev
- Verified
What it is
DeepFabric generates synthetic training data for language models and agent evaluations. DeepFabric can be used as a library, as a CLI tool, or via YAML configuration. The project says it creates domain-specific datasets by combining reasoning traces with tool-calling patterns.
Main features
DeepFabric supports real tool execution during dataset generation using the Spin Framework.
Tools execute in isolated WebAssembly sandboxes instead of simulating tool outputs.
DeepFabric uses a ReAct (Reason-Act-Observe) loop for tool calling, and the agent observes real results before deciding the next action.
Tool definitions can be directly imported from MCP (Model Context Protocol) server schemas and automatically mocked.
The project says DeepFabric uses constrained decoding and response validation, along with real tool executions within isolated webassembly environments.
Post-training, DeepFabric's built-in evaluation engine assesses model performance.
Getting started
DeepFabric also uses YAML configuration with 3 main sections and optional shared LLM defaults.
The YAML configuration example uses mocked tool execution and requires a Spin service, which the project provides in a docker image.
To use the YAML configuration, first save it as config.yaml, then run generation with that file as the input; this page does not include the YAML example, so follow the official documentation for its exact form.
Tool tracing can be enabled in the YAML config; the YAML code block on this page is only the tool tracing fragment, not a complete configuration, so it must be merged into a full YAML configuration with its three main sections before use, and the full configuration has to come from the official documentation rather than saving this fragment alone as config.yaml to run.
DeepFabric returns standard HuggingFace datasets.
Once a dataset is generated, it can be automatically uploaded to Hugging Face.
A generated dataset can be directly imported into training frameworks like TRL, Unsloth, and Axolotl.
pip install deepfabricexport OPENAI_API_KEY="your-api-key"
deepfabric generate \
--topic-prompt "Python programming fundamentals" \
--generation-system-prompt "You are a Python expert" \
--mode graph \
--depth 3 \
--degree 3 \
--num-samples 9 \
--batch-size 3 \
--provider openai \
--model gpt-4o \
--output-save-as dataset.jsonldeepfabric generate config.yamlgeneration:
conversation:
type: cot
reasoning_style: agent
tools:
spin_endpoint: "http://localhost:3000" # Spin service URL
available: # Filter to specific tools
- read_file
- write_file
- list_files
max_agent_steps: 5 # Max ReAct iterations
# Optional: Seed initial state for scenarios
scenario_seed:
files:
"config.json": '{"debug": true}'Who it is for
DeepFabric includes a virtual filesystem (VFS) component. In the VFS, each session gets an isolated filesystem. Changes in the VFS session filesystem do not persist between samples.
DeepFabric can be extended with custom tools written in Python, JavaScript, Go, or Rust. DeepFabric provides an evaluation system to measure how well fine-tuned models perform on tool-calling tasks. The evaluator computes several metrics for tool-calling tasks.
In the providers list, OpenAI is listed as a cloud provider. In the providers list, Anthropic is listed as a cloud provider. In the providers list, Google Gemini is listed as a cloud provider.
In the providers list, Ollama is listed as a local provider. In the providers list, OpenRouter is listed as a cloud provider. The project collects anonymous usage metrics to improve DeepFabric.
The project does not collect personal data, prompts, or API keys.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/nolabs-ai/deepfabricFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.