Closed kartikbhtt7 closed 3 months ago
This update introduces significant enhancements to the project by adding the bitsandbytes
library for memory-efficient model handling and implementing a structured approach to model quantization. New serializer fields for quantization options and test text improve flexibility, while utility functions enable better task management. Overall, these changes enhance capabilities and user experience in deploying and managing machine learning models.
File Path | Change Summary |
---|---|
pyproject.toml |
Added new dependency bitsandbytes = "^0.43.3" for memory optimization in machine learning. |
workflow/serializers.py |
Introduced quantization_type and test_text fields in ModelDataSerializer for enhanced functionality. |
workflow/training/quantize.py |
Implemented ModelHandler class for loading, quantizing, and inferring models with various strategies. |
workflow/training/quantize_model.py |
Created specific handlers for different model types to facilitate modular quantization processes. |
workflow/training/train.py |
Updated train function to support model quantization during training, enhancing efficiency. |
workflow/training/utils.py |
Added get_model_class function for mapping task types to model classes, improving modularity. |
workflow/training/whisper.py |
Modified WhisperFineTuning class by removing tokenizer management from the constructor and push method. |
sequenceDiagram
participant User
participant API
participant QuantizeHandler
participant ModelHandler
User->>API: Request model training with quantization options
API->>QuantizeHandler: Check for quantization type
QuantizeHandler->>ModelHandler: Load and quantize model
ModelHandler->>ModelHandler: Run inference
ModelHandler->>API: Return quantized model results
API->>User: Send response with quantized model details
🐰 In fields of code, I hop with glee,
New features bloom for all to see!
With quantized models, we leap and bound,
Optimization sweet, in every sound.
Bits and bytes, a clever play,
To make our work bright as day! 🌟
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
Chores