Skip to content

Commit

Permalink
feat: support multiple quantization types
Browse files Browse the repository at this point in the history
This commit adds the ability to select and run multiple quantization types simultaneously. It includes:
- Replacing the quantization type dropdown with a multi-select list
- Updating preset saving and loading to handle multiple quantization types
- Modifying the quantize_model function to process all selected types
- fix formatting issue with previous commit
- use error and in progress messages from localizations in QuantizationThread
  • Loading branch information
leafspark committed Aug 5, 2024
1 parent e69237b commit dc9a1c8
Show file tree
Hide file tree
Showing 4 changed files with 330 additions and 229 deletions.
23 changes: 19 additions & 4 deletions docs/AutoGGUF.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,25 @@ def load_models(self):

def quantize_model(self):
"""
Start the model quantization process.
This method collects all the quantization settings, constructs the
quantization command, and starts a new thread to run the quantization process.
Initiates the quantization process for the selected model with the chosen quantization types.
This function performs the following steps:
1. Validates the input parameters and selected model.
2. Retrieves the backend path and selected quantization types.
3. For each selected quantization type:
a. Constructs the output file name based on the quantization options.
b. Builds the quantization command with all selected options.
c. Creates a new thread for the quantization process.
d. Sets up a task item in the GUI to display progress and status.
e. Connects the thread signals to update the GUI and handle errors.
f. Starts the quantization thread.
The function handles various exceptions and displays error messages if any step fails.
Raises:
ValueError: If required inputs are missing or invalid.
FileNotFoundError: If the input model file doesn't exist.
Exception: For any other unexpected errors during the process.
"""

def update_model_info(self, model_info):
Expand Down
Loading

0 comments on commit dc9a1c8

Please sign in to comment.