TextForge automates model distillation, training, quantization, and deployment for text classification. It simplifies synthetic data generation, model optimization using ONNX runtime, and FastAPI serving.
- Automated synthetic data generation
- Transformer model training
- ONNX conversion with 8-bit quantization
- Automated model API serving with FastAPI
pip install textforgeimport pandas as pd
from textforge.pipeline import Pipeline, PipelineConfig
pipeline_config = PipelineConfig(
api_key=api_key,
labels=['business','education','entertainment','sports','technology'],
query="Classify based on headlines",
save_steps=200,
eval_steps=200,
epochs=10
)
df = pd.read_csv('data.csv')
pipeline = Pipeline(pipeline_config)
pipeline.run(data=df, save=True, serve=True)This project is licensed under the MIT License - see the LICENSE file for details.