mirror of https://github.com/leafspark/AutoGGUF
Add files via upload
This commit is contained in:
parent
108e30f1f9
commit
c6ae2e319c
21
README.md
21
README.md
|
@ -1,29 +1,24 @@
|
|||
# AutoGGUF - automated GGUF model quantizer
|
||||
AutoGGUF - Automated GGUF Model Quantizer
|
||||
|
||||
This application provides a graphical user interface for quantizing GGUF models
|
||||
using the llama.cpp library. It allows users to download different versions of
|
||||
llama.cpp, manage multiple backends, and perform quantization tasks with various
|
||||
options.
|
||||
|
||||
**Main features**:
|
||||
Main features:
|
||||
1. Download and manage llama.cpp backends
|
||||
2. Select and quantize GGUF models
|
||||
3. Configure quantization parameters
|
||||
4. Monitor system resources during quantization
|
||||
|
||||
**Usage**:
|
||||
1. Install dependencies, either using the `requirements.txt` file or `pip install PyQt6 requests psutil`.
|
||||
2. Run the `run.bat` script to start the application, or run the command `python src/main.py`.
|
||||
Usage:
|
||||
Run the main.py script to start the application.
|
||||
|
||||
**Dependencies**:
|
||||
Dependencies:
|
||||
- PyQt6
|
||||
- requests
|
||||
- psutil
|
||||
|
||||
**To be implemented:**
|
||||
- Actual progress bar tracking
|
||||
- Download safetensors from HF and convert to unquanted GGUF
|
||||
- Specify multiple KV overrides
|
||||
|
||||
**User interface:**
|
||||

|
||||
Author: leafspark
|
||||
Version: 1.0.0
|
||||
License: apache-2.0
|
|
@ -531,7 +531,7 @@ def show_task_details(self, item):
|
|||
|
||||
# Load existing content
|
||||
if os.path.exists(task_item.log_file):
|
||||
with open(task_item.log_file, 'r') as f:
|
||||
with open_file_safe(task_item.log_file, 'r') as f:
|
||||
log_text.setPlainText(f.read())
|
||||
|
||||
# Connect to the thread if it's still running
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
import platform
|
||||
import requests
|
||||
import zipfile
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
from imports_and_globals import open_file_safe
|
||||
|
||||
class QuantizationThread(QThread):
|
||||
output_signal = pyqtSignal(str)
|
||||
|
@ -32,7 +34,7 @@ def run(self):
|
|||
try:
|
||||
self.process = subprocess.Popen(self.command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
text=True, cwd=self.cwd)
|
||||
with open(self.log_file, 'w') as log:
|
||||
with open_file_safe(self.log_file, 'w') as log:
|
||||
for line in self.process.stdout:
|
||||
line = line.strip()
|
||||
self.output_signal.emit(line)
|
||||
|
@ -40,7 +42,6 @@ def run(self):
|
|||
log.flush()
|
||||
self.status_signal.emit("In Progress")
|
||||
self.parse_model_info(line)
|
||||
|
||||
self.process.wait()
|
||||
if self.process.returncode == 0:
|
||||
self.status_signal.emit("Completed")
|
||||
|
|
|
@ -18,4 +18,13 @@
|
|||
|
||||
def ensure_directory(path):
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
os.makedirs(path)
|
||||
|
||||
def open_file_safe(file_path, mode='r'):
|
||||
encodings = ['utf-8', 'latin-1', 'ascii', 'utf-16']
|
||||
for encoding in encodings:
|
||||
try:
|
||||
return open(file_path, mode, encoding=encoding)
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
raise ValueError(f"Unable to open file {file_path} with any of the encodings: {encodings}")
|
Loading…
Reference in New Issue