Closed kartikbhtt7 closed 3 months ago
The recent changes introduce significant enhancements to model handling in the workflow, primarily by adding ONNX conversion capabilities and improving model quantization processes. New fields and functions enrich serializer functionality and facilitate seamless management of model components. The integration with Hugging Face Hub for model deployment has also been streamlined, ensuring a more efficient workflow for machine learning tasks.
Files | Change Summary |
---|---|
pyproject.toml |
Updated optimum package version from extras to a simplified version string, potentially affecting feature availability. |
workflow/serializers.py |
Added a new onnx field to ModelDataSerializer , allowing for ONNX model conversion during serialization. |
workflow/training/onnx.py |
Introduced functionality for converting models to ONNX format, including the convert_to_onnx and push_onnx_to_hub functions for deployment. |
workflow/training/quantize_model.py |
Enhanced quantize_model to save the quantized model and its tokenizer/processor, improving model management after quantization. |
workflow/training/train.py |
Integrated ONNX conversion and updated quantization handling to return directory paths instead of model objects, streamlining model output processes. |
workflow/training/whisper.py |
Modified push_to_hub in trainer class to also push associated processor data, enhancing upload functionality to Hugging Face Hub. |
sequenceDiagram
participant User
participant TrainingWorkflow
participant ONNXConverter
participant Hub
User->>TrainingWorkflow: Start training request
TrainingWorkflow->>TrainingWorkflow: Check for ONNX conversion
alt Onnx conversion needed
TrainingWorkflow->>ONNXConverter: Convert model to ONNX
ONNXConverter-->>TrainingWorkflow: Return ONNX directory
TrainingWorkflow->>Hub: Push ONNX model to Hub
end
TrainingWorkflow->>TrainingWorkflow: Quantize model
TrainingWorkflow-->>User: Return training status
π In fields of code, with hops so bright,
We craft new ways to take flight.
ONNX models and quantized dreams,
A seamless workflow, or so it seems.
With every change, our spirits soar,
Letβs celebrate, and code some more! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores