diff --git a/docs/AutoGGUF.py b/docs/AutoGGUF.py index ff7344f..d2d3cfd 100644 --- a/docs/AutoGGUF.py +++ b/docs/AutoGGUF.py @@ -1,7 +1,7 @@ class AutoGGUF(QMainWindow): """ AutoGGUF is a PyQt6-based graphical user interface for managing and quantizing large language models. - + This class provides functionality for: - Loading and displaying models (including sharded models) - Quantizing models with various options @@ -9,7 +9,7 @@ class AutoGGUF(QMainWindow): - Generating importance matrices - Converting and exporting LoRA models - Managing quantization tasks - + The GUI allows users to interact with these features in an intuitive way, providing options for model selection, quantization parameters, and task management. """ diff --git a/docs/KVOverrideEntry.py b/docs/KVOverrideEntry.py new file mode 100644 index 0000000..e4568c8 --- /dev/null +++ b/docs/KVOverrideEntry.py @@ -0,0 +1,87 @@ +class KVOverrideEntry(QWidget): + """ + KVOverrideEntry is a PyQt6-based widget for creating and managing key-value override entries. + + This class provides functionality for: + - Inputting keys and values with type specification + - Dynamic value substitution using predefined placeholders + - Validating inputs based on selected data types + - Generating formatted override strings + + The widget includes input fields for keys and values, a type selector, + and a delete button. It supports various system-related and custom placeholders + for dynamic value generation. + + Attributes: + deleted (pyqtSignal): Signal emitted when the entry is deleted. + key_input (QLineEdit): Input field for the key. + type_combo (QComboBox): Dropdown for selecting the value type. + value_input (QLineEdit): Input field for the value. + + Supported dynamic placeholders: + {system.time.milliseconds}: Current time in milliseconds + {system.time.seconds}: Current time in seconds + {system.date.iso}: Current date in ISO format + {system.datetime.iso}: Current date and time in ISO format + {system.username}: Current system username + {system.hostname}: Current system hostname + {system.platform}: Current operating system platform + {system.python.version}: Python version + {system.date}: Current date in YYYY-MM-DD format + {model.name}: Model name (if provided) + {quant.type}: Quantization type (if provided) + {output.path}: Output path (if provided) + """ + + def __init__(self, parent=None): + """ + Initialize the KVOverrideEntry widget. + + This method sets up the widget layout, creates and configures input fields, + sets up validators, and connects signals to their respective slots. + + Args: + parent (QWidget, optional): The parent widget. Defaults to None. + """ + + def delete_clicked(self): + """ + Handle the delete button click event. + + Emits the 'deleted' signal to notify the parent widget that this entry + should be removed. + """ + + def get_override_string(self, model_name=None, quant_type=None, output_path=None): + """ + Generate a formatted override string with dynamic value substitution. + + This method processes the input fields and replaces any placeholders + in the value with their corresponding dynamic values. + + Args: + model_name (str, optional): Model name for substitution. + quant_type (str, optional): Quantization type for substitution. + output_path (str, optional): Output path for substitution. + + Returns: + str: Formatted override string in the format "key=type:value". + """ + + def get_raw_override_string(self): + """ + Generate a raw override string without dynamic substitution. + + Returns: + str: Raw override string with placeholders intact, in the format "key=type:value". + """ + + def update_validator(self, type_): + """ + Update the validator for the value input field based on the selected type. + + This method ensures that the value input adheres to the chosen data type. + + Args: + type_ (str): The selected data type ('int', 'float', or 'str'). + """ diff --git a/docs/QuantizationThread.py b/docs/QuantizationThread.py new file mode 100644 index 0000000..6275d50 --- /dev/null +++ b/docs/QuantizationThread.py @@ -0,0 +1,64 @@ +class QuantizationThread(QThread): + """ + QuantizationThread is a PyQt6-based thread for managing model quantization processes. + + This class provides functionality for: + - Running quantization commands as subprocesses + - Parsing and emitting model information during quantization + - Logging quantization output to a file + - Communicating process status, output, and errors to the main thread + + The thread manages the execution of quantization commands, monitors their output, + and parses relevant model information. It uses Qt signals to communicate various + events and data back to the main application thread. + + Attributes: + output_signal (pyqtSignal): Signal emitting subprocess output lines. + status_signal (pyqtSignal): Signal for updating quantization status. + finished_signal (pyqtSignal): Signal emitted when quantization is complete. + error_signal (pyqtSignal): Signal for reporting errors during quantization. + model_info_signal (pyqtSignal): Signal for sending parsed model information. + + Methods: + run(): Executes the quantization process and manages its lifecycle. + parse_model_info(line: str): Parses output lines for model information. + terminate(): Safely terminates the running subprocess. + """ + + def __init__(self, command, cwd, log_file): + """ + Initialize the QuantizationThread. + + Args: + command (list): The command to execute for quantization. + cwd (str): The working directory for the subprocess. + log_file (str): Path to the file where output will be logged. + """ + + def run(self): + """ + Execute the quantization process. + + This method runs the subprocess, captures its output, logs it, + parses model information, and emits signals for status updates. + It handles process completion and any exceptions that occur. + """ + + def parse_model_info(self, line): + """ + Parse a line of subprocess output for model information. + + This method extracts various pieces of model information from + the output lines and stores them in the model_info dictionary. + + Args: + line (str): A line of output from the quantization process. + """ + + def terminate(self): + """ + Terminate the running subprocess. + + This method safely terminates the quantization process if it's + still running, using SIGTERM first and SIGKILL if necessary. + """ diff --git a/docs/convert_lora_to_ggml.py b/docs/convert_lora_to_ggml.py new file mode 100644 index 0000000..2e76e51 --- /dev/null +++ b/docs/convert_lora_to_ggml.py @@ -0,0 +1,32 @@ +""" +Convert PEFT LoRA adapters to GGML format. + +This script converts Hugging Face PEFT LoRA adapter files to the GGML format +used by llama.cpp and related projects. It reads the adapter configuration +from 'adapter_config.json' and the model weights from 'adapter_model.bin' +or 'adapter_model.safetensors', then writes the converted model to +'ggml-adapter-model.bin' in the same directory. + +Usage: + python lora_to_gguf.py [arch] + +Arguments: + path: Directory containing the PEFT LoRA files + arch: Model architecture (default: llama) + +The script supports various model architectures and handles both PyTorch +and safetensors formats for input weights. It performs necessary tensor +transformations and writes the output in the GGML binary format. + +Requirements: + - Python 3.6+ + - numpy + - torch + - safetensors (optional, for safetensors input) + +The script also requires the GGUF Python module, which should be in the +'gguf-py/gguf' subdirectory relative to this script's location. + +Note: This script is designed for use with llama.cpp and related projects. +Ensure compatibility with your target application when using the output. +""" diff --git a/docs/convert_lora_to_gguf.py b/docs/convert_lora_to_gguf.py new file mode 100644 index 0000000..797d414 --- /dev/null +++ b/docs/convert_lora_to_gguf.py @@ -0,0 +1,40 @@ +""" +LoRA to GGUF Converter + +This script converts a Hugging Face PEFT LoRA adapter to a GGML-compatible file format. + +Key features: +- Supports various output formats (f32, f16, bf16, q8_0, auto) +- Handles big-endian and little-endian architectures +- Provides options for lazy evaluation and verbose output +- Combines base model information with LoRA adapters + +Classes: + PartialLoraTensor: Dataclass for storing partial LoRA tensor information. + LoraTorchTensor: Custom tensor class for LoRA operations and transformations. + LoraModel: Extends the base model class to incorporate LoRA-specific functionality. + +Functions: + get_base_tensor_name: Extracts the base tensor name from a LoRA tensor name. + pyinstaller_include: Placeholder for PyInstaller import handling. + parse_args: Parses command-line arguments for the script. + +Usage: + python lora_to_gguf.py --base [options] + +Arguments: + --base: Path to the directory containing the base model file (required) + lora_path: Path to the directory containing the LoRA adapter file (required) + --outfile: Path to write the output file (optional) + --outtype: Output format (f32, f16, bf16, q8_0, auto; default: f16) + --bigendian: Flag to indicate big-endian machine execution + --no-lazy: Disable lazy evaluation (uses more RAM) + --verbose: Increase output verbosity + --dry-run: Perform a dry run without writing files + +The script processes LoRA adapters, combines them with base model information, +and generates a GGML-compatible file for use in various applications. + +Note: This script requires specific dependencies like torch, gguf, and safetensors. +Ensure all required libraries are installed before running the script. +""" diff --git a/src/AutoGGUF.py b/src/AutoGGUF.py index bde9318..ae14b65 100644 --- a/src/AutoGGUF.py +++ b/src/AutoGGUF.py @@ -1240,7 +1240,7 @@ def load_models(self): single_models = [] # Regex pattern to match sharded model filenames - shard_pattern = re.compile(r'(.*)-(\d+)-of-(\d+)\.gguf$') + shard_pattern = re.compile(r"(.*)-(\d+)-of-(\d+)\.gguf$") for file in os.listdir(models_dir): if file.endswith(".gguf"): @@ -1367,7 +1367,7 @@ def quantize_model(self): quant_type = self.quant_type.currentText() input_path = os.path.join(self.models_input.text(), model_file) - + # Start building the output name output_name_parts = [ os.path.splitext(model_name)[0], @@ -1376,7 +1376,10 @@ def quantize_model(self): ] # Check for output tensor options - if self.use_output_tensor_type.isChecked() or self.leave_output_tensor.isChecked(): + if ( + self.use_output_tensor_type.isChecked() + or self.leave_output_tensor.isChecked() + ): output_tensor_part = "o" if self.use_output_tensor_type.isChecked(): output_tensor_part += "." + self.output_tensor_type.currentText() @@ -1421,9 +1424,13 @@ def quantize_model(self): if self.exclude_weights.text(): command.extend(["--exclude-weights", self.exclude_weights.text()]) if self.use_output_tensor_type.isChecked(): - command.extend(["--output-tensor-type", self.output_tensor_type.currentText()]) + command.extend( + ["--output-tensor-type", self.output_tensor_type.currentText()] + ) if self.use_token_embedding_type.isChecked(): - command.extend(["--token-embedding-type", self.token_embedding_type.currentText()]) + command.extend( + ["--token-embedding-type", self.token_embedding_type.currentText()] + ) if self.keep_split.isChecked(): command.append("--keep-split") if self.kv_override_entries: @@ -1446,7 +1453,9 @@ def quantize_model(self): ensure_directory(logs_path) timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") - log_file = os.path.join(logs_path, f"{model_name}_{timestamp}_{quant_type}.log") + log_file = os.path.join( + logs_path, f"{model_name}_{timestamp}_{quant_type}.log" + ) # Log quant command command_str = " ".join(command) @@ -1455,14 +1464,18 @@ def quantize_model(self): thread = QuantizationThread(command, backend_path, log_file) self.quant_threads.append(thread) - task_item = TaskListItem(QUANTIZING_MODEL_TO.format(model_name, quant_type), log_file) + task_item = TaskListItem( + QUANTIZING_MODEL_TO.format(model_name, quant_type), log_file + ) list_item = QListWidgetItem(self.task_list) list_item.setSizeHint(task_item.sizeHint()) self.task_list.addItem(list_item) self.task_list.setItemWidget(list_item, task_item) # Connect the output signal to the new progress parsing function - thread.output_signal.connect(lambda line: self.parse_progress(line, task_item)) + thread.output_signal.connect( + lambda line: self.parse_progress(line, task_item) + ) thread.status_signal.connect(task_item.update_status) thread.finished_signal.connect(lambda: self.task_finished(thread)) thread.error_signal.connect(lambda err: self.handle_error(err, task_item)) diff --git a/src/localizations.py b/src/localizations.py index b33a66c..4ac0b52 100644 --- a/src/localizations.py +++ b/src/localizations.py @@ -857,9 +857,7 @@ def __init__(self): self.NO_MODEL_SELECTED = "未选择模型" self.REFRESH_RELEASES = "刷新发布版本" self.NO_SUITABLE_CUDA_BACKENDS = "未找到合适的CUDA后端" - self.LLAMACPP_DOWNLOADED_EXTRACTED = ( - "llama.cpp二进制文件已下载并提取到{0}\nCUDA文件已提取到{1}" - ) + self.LLAMACPP_DOWNLOADED_EXTRACTED = "llama.cpp二进制文件已下载并提取到{0}\nCUDA文件已提取到{1}" self.CUDA_FILES_EXTRACTED = "CUDA文件已提取到" self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = "未找到适合提取的CUDA后端" self.ERROR_FETCHING_RELEASES = "获取发布版本时出错:{0}" @@ -890,9 +888,7 @@ def __init__(self): "llama.cpp二进制文件已下载并提取到{0}\nCUDA文件已提取到{1}" ) self.NO_SUITABLE_CUDA_BACKEND_FOUND = "未找到适合提取的CUDA后端" - self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = ( - "llama.cpp二进制文件已下载并提取到{0}" - ) + self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = "llama.cpp二进制文件已下载并提取到{0}" self.REFRESHING_LLAMACPP_RELEASES = "刷新llama.cpp发布版本" self.UPDATING_ASSET_LIST = "更新资源列表" self.UPDATING_CUDA_OPTIONS = "更新CUDA选项" @@ -956,9 +952,7 @@ def __init__(self): self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = "对output.weight张量使用此类型" self.TOKEN_EMBEDDING_TYPE = "令牌嵌入类型:" self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = "对令牌嵌入张量使用此类型" - self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = ( - "将在与输入相同的分片中生成量化模型" - ) + self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = "将在与输入相同的分片中生成量化模型" self.OVERRIDE_MODEL_METADATA = "覆盖模型元数据" self.INPUT_DATA_FILE_FOR_IMATRIX = "IMatrix生成的输入数据文件" self.MODEL_TO_BE_QUANTIZED = "要量化的模型" @@ -1406,9 +1400,7 @@ def __init__(self): self.NO_MODEL_SELECTED = "कोई मॉडल चयनित नहीं" self.REFRESH_RELEASES = "रिलीज़ रीफ्रेश करें" self.NO_SUITABLE_CUDA_BACKENDS = "कोई उपयुक्त CUDA बैकएंड नहीं मिला" - self.LLAMACPP_DOWNLOADED_EXTRACTED = ( - "llama.cpp बाइनरी डाउनलोड और {0} में निकाली गई\nCUDA फ़ाइलें {1} में निकाली गईं" - ) + self.LLAMACPP_DOWNLOADED_EXTRACTED = "llama.cpp बाइनरी डाउनलोड और {0} में निकाली गई\nCUDA फ़ाइलें {1} में निकाली गईं" self.CUDA_FILES_EXTRACTED = "CUDA फ़ाइलें निकाली गईं" self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = ( "निष्कर्षण के लिए कोई उपयुक्त CUDA बैकएंड नहीं मिला" @@ -1437,9 +1429,7 @@ def __init__(self): self.RESTARTING_TASK = "कार्य पुनः आरंभ हो रहा है: {0}" self.IN_PROGRESS = "प्रगति में" self.DOWNLOAD_FINISHED_EXTRACTED_TO = "डाउनलोड समाप्त। निकाला गया: {0}" - self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = ( - "llama.cpp बाइनरी डाउनलोड और {0} में निकाली गई\nCUDA फ़ाइलें {1} में निकाली गईं" - ) + self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = "llama.cpp बाइनरी डाउनलोड और {0} में निकाली गई\nCUDA फ़ाइलें {1} में निकाली गईं" self.NO_SUITABLE_CUDA_BACKEND_FOUND = ( "निष्कर्षण के लिए कोई उपयुक्त CUDA बैकएंड नहीं मिला" ) @@ -1461,17 +1451,25 @@ def __init__(self): self.DELETING_TASK = "कार्य हटाया जा रहा है: {0}" self.LOADING_MODELS = "मॉडल लोड हो रहे हैं" self.LOADED_MODELS = "{0} मॉडल लोड किए गए" - self.BROWSING_FOR_MODELS_DIRECTORY = "मॉडल निर्देशिका के लिए ब्राउज़ किया जा रहा है" + self.BROWSING_FOR_MODELS_DIRECTORY = ( + "मॉडल निर्देशिका के लिए ब्राउज़ किया जा रहा है" + ) self.SELECT_MODELS_DIRECTORY = "मॉडल निर्देशिका चुनें" - self.BROWSING_FOR_OUTPUT_DIRECTORY = "आउटपुट निर्देशिका के लिए ब्राउज़ किया जा रहा है" + self.BROWSING_FOR_OUTPUT_DIRECTORY = ( + "आउटपुट निर्देशिका के लिए ब्राउज़ किया जा रहा है" + ) self.SELECT_OUTPUT_DIRECTORY = "आउटपुट निर्देशिका चुनें" - self.BROWSING_FOR_LOGS_DIRECTORY = "लॉग निर्देशिका के लिए ब्राउज़ किया जा रहा है" + self.BROWSING_FOR_LOGS_DIRECTORY = ( + "लॉग निर्देशिका के लिए ब्राउज़ किया जा रहा है" + ) self.SELECT_LOGS_DIRECTORY = "लॉग निर्देशिका चुनें" self.BROWSING_FOR_IMATRIX_FILE = "IMatrix फ़ाइल के लिए ब्राउज़ किया जा रहा है" self.SELECT_IMATRIX_FILE = "IMatrix फ़ाइल चुनें" self.RAM_USAGE_FORMAT = "{0:.1f}% ({1} MB / {2} MB)" self.CPU_USAGE_FORMAT = "CPU उपयोग: {0:.1f}%" - self.VALIDATING_QUANTIZATION_INPUTS = "क्वांटाइजेशन इनपुट सत्यापित किए जा रहे हैं" + self.VALIDATING_QUANTIZATION_INPUTS = ( + "क्वांटाइजेशन इनपुट सत्यापित किए जा रहे हैं" + ) self.MODELS_PATH_REQUIRED = "मॉडल पथ आवश्यक है" self.OUTPUT_PATH_REQUIRED = "आउटपुट पथ आवश्यक है" self.LOGS_PATH_REQUIRED = "लॉग पथ आवश्यक है" @@ -1498,7 +1496,9 @@ def __init__(self): self.STARTING_IMATRIX_GENERATION = "IMatrix उत्पादन शुरू हो रहा है" self.BACKEND_PATH_NOT_EXIST = "बैकएंड पथ मौजूद नहीं है: {0}" self.GENERATING_IMATRIX = "IMatrix उत्पन्न किया जा रहा है" - self.ERROR_STARTING_IMATRIX_GENERATION = "IMatrix उत्पादन शुरू करने में त्रुटि: {0}" + self.ERROR_STARTING_IMATRIX_GENERATION = ( + "IMatrix उत्पादन शुरू करने में त्रुटि: {0}" + ) self.IMATRIX_GENERATION_TASK_STARTED = "IMatrix उत्पादन कार्य शुरू हुआ" self.ERROR_MESSAGE = "त्रुटि: {0}" self.TASK_ERROR = "कार्य त्रुटि: {0}" @@ -1508,14 +1508,14 @@ def __init__(self): self.ALLOWS_REQUANTIZING = ( "पहले से क्वांटाइज़ किए गए टेंसर को पुनः क्वांटाइज़ करने की अनुमति देता है" ) - self.LEAVE_OUTPUT_WEIGHT = "output.weight को अक्वांटाइज़ (या पुनः क्वांटाइज़) छोड़ देगा" - self.DISABLE_K_QUANT_MIXTURES = ( - "k-quant मिश्रण को अक्षम करें और सभी टेंसर को एक ही प्रकार में क्वांटाइज़ करें" + self.LEAVE_OUTPUT_WEIGHT = ( + "output.weight को अक्वांटाइज़ (या पुनः क्वांटाइज़) छोड़ देगा" ) - self.USE_DATA_AS_IMPORTANCE_MATRIX = ( - "क्वांट अनुकूलन के लिए फ़ाइल में डेटा को महत्व मैट्रिक्स के रूप में उपयोग करें" + self.DISABLE_K_QUANT_MIXTURES = "k-quant मिश्रण को अक्षम करें और सभी टेंसर को एक ही प्रकार में क्वांटाइज़ करें" + self.USE_DATA_AS_IMPORTANCE_MATRIX = "क्वांट अनुकूलन के लिए फ़ाइल में डेटा को महत्व मैट्रिक्स के रूप में उपयोग करें" + self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( + "इन टेंसर के लिए महत्व मैट्रिक्स का उपयोग करें" ) - self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = "इन टेंसर के लिए महत्व मैट्रिक्स का उपयोग करें" self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( "इन टेंसर के लिए महत्व मैट्रिक्स का उपयोग न करें" ) @@ -1972,9 +1972,7 @@ def __init__(self): self.RESTART = "再起動" self.DELETE = "削除" self.CONFIRM_DELETION = "このタスクを削除してもよろしいですか?" - self.TASK_RUNNING_WARNING = ( - "一部のタスクはまだ実行中です。終了してもよろしいですか?" - ) + self.TASK_RUNNING_WARNING = "一部のタスクはまだ実行中です。終了してもよろしいですか?" self.YES = "はい" self.NO = "いいえ" self.DOWNLOAD_COMPLETE = "ダウンロード完了" @@ -1987,11 +1985,11 @@ def __init__(self): self.NO_MODEL_SELECTED = "モデルが選択されていません" self.REFRESH_RELEASES = "リリースを更新" self.NO_SUITABLE_CUDA_BACKENDS = "適切なCUDAバックエンドが見つかりませんでした" - self.LLAMACPP_DOWNLOADED_EXTRACTED = "llama.cppバイナリがダウンロードされ、{0}に抽出されました\nCUDAファイルは{1}に抽出されました" - self.CUDA_FILES_EXTRACTED = "CUDAファイルはに抽出されました" - self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = ( - "抽出に適したCUDAバックエンドが見つかりませんでした" + self.LLAMACPP_DOWNLOADED_EXTRACTED = ( + "llama.cppバイナリがダウンロードされ、{0}に抽出されました\nCUDAファイルは{1}に抽出されました" ) + self.CUDA_FILES_EXTRACTED = "CUDAファイルはに抽出されました" + self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = "抽出に適したCUDAバックエンドが見つかりませんでした" self.ERROR_FETCHING_RELEASES = "リリースの取得中にエラーが発生しました: {0}" self.CONFIRM_DELETION_TITLE = "削除の確認" self.LOG_FOR = "{0}のログ" @@ -2016,10 +2014,10 @@ def __init__(self): self.RESTARTING_TASK = "タスクを再起動しています: {0}" self.IN_PROGRESS = "処理中" self.DOWNLOAD_FINISHED_EXTRACTED_TO = "ダウンロードが完了しました。抽出先: {0}" - self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = "llama.cppバイナリがダウンロードされ、{0}に抽出されました\nCUDAファイルは{1}に抽出されました" - self.NO_SUITABLE_CUDA_BACKEND_FOUND = ( - "抽出に適したCUDAバックエンドが見つかりませんでした" + self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = ( + "llama.cppバイナリがダウンロードされ、{0}に抽出されました\nCUDAファイルは{1}に抽出されました" ) + self.NO_SUITABLE_CUDA_BACKEND_FOUND = "抽出に適したCUDAバックエンドが見つかりませんでした" self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = ( "llama.cppバイナリがダウンロードされ、{0}に抽出されました" ) @@ -2069,42 +2067,24 @@ def __init__(self): self.STARTING_IMATRIX_GENERATION = "IMatrixの生成を開始しています" self.BACKEND_PATH_NOT_EXIST = "バックエンドパスが存在しません: {0}" self.GENERATING_IMATRIX = "IMatrixを生成しています" - self.ERROR_STARTING_IMATRIX_GENERATION = ( - "IMatrixの生成を開始中にエラーが発生しました: {0}" - ) + self.ERROR_STARTING_IMATRIX_GENERATION = "IMatrixの生成を開始中にエラーが発生しました: {0}" self.IMATRIX_GENERATION_TASK_STARTED = "IMatrix生成タスクが開始されました" self.ERROR_MESSAGE = "エラー: {0}" self.TASK_ERROR = "タスクエラー: {0}" self.APPLICATION_CLOSING = "アプリケーションを終了しています" self.APPLICATION_CLOSED = "アプリケーションが終了しました" self.SELECT_QUANTIZATION_TYPE = "量子化タイプを選択してください" - self.ALLOWS_REQUANTIZING = ( - "すでに量子化されているテンソルの再量子化を許可します" - ) + self.ALLOWS_REQUANTIZING = "すでに量子化されているテンソルの再量子化を許可します" self.LEAVE_OUTPUT_WEIGHT = "output.weightは(再)量子化されません" - self.DISABLE_K_QUANT_MIXTURES = ( - "k-quant混合を無効にし、すべてのテンソルを同じタイプに量子化します" - ) - self.USE_DATA_AS_IMPORTANCE_MATRIX = ( - "量子化最適化の重要度マトリックスとしてファイル内のデータを使用します" - ) - self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( - "これらのテンソルに重要度マトリックスを使用します" - ) - self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( - "これらのテンソルに重要度マトリックスを使用しません" - ) + self.DISABLE_K_QUANT_MIXTURES = "k-quant混合を無効にし、すべてのテンソルを同じタイプに量子化します" + self.USE_DATA_AS_IMPORTANCE_MATRIX = "量子化最適化の重要度マトリックスとしてファイル内のデータを使用します" + self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = "これらのテンソルに重要度マトリックスを使用します" + self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = "これらのテンソルに重要度マトリックスを使用しません" self.OUTPUT_TENSOR_TYPE = "出力テンソルタイプ:" - self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = ( - "output.weightテンソルにこのタイプを使用します" - ) + self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = "output.weightテンソルにこのタイプを使用します" self.TOKEN_EMBEDDING_TYPE = "トークン埋め込みタイプ:" - self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = ( - "トークン埋め込みテンソルにこのタイプを使用します" - ) - self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = ( - "入力と同じシャードで量子化されたモデルを生成します" - ) + self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = "トークン埋め込みテンソルにこのタイプを使用します" + self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = "入力と同じシャードで量子化されたモデルを生成します" self.OVERRIDE_MODEL_METADATA = "モデルメタデータを上書きする" self.INPUT_DATA_FILE_FOR_IMATRIX = "IMatrix生成用の入力データファイル" self.MODEL_TO_BE_QUANTIZED = "量子化されるモデル" @@ -2761,11 +2741,11 @@ def __init__(self): self.NO_MODEL_SELECTED = "모델이 선택되지 않았습니다" self.REFRESH_RELEASES = "릴리스 새로 고침" self.NO_SUITABLE_CUDA_BACKENDS = "적합한 CUDA 백엔드를 찾을 수 없습니다" - self.LLAMACPP_DOWNLOADED_EXTRACTED = "llama.cpp 바이너리가 다운로드되어 {0}에 추출되었습니다.\nCUDA 파일이 {1}에 추출되었습니다." - self.CUDA_FILES_EXTRACTED = "CUDA 파일이 에 추출되었습니다." - self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = ( - "추출에 적합한 CUDA 백엔드를 찾을 수 없습니다." + self.LLAMACPP_DOWNLOADED_EXTRACTED = ( + "llama.cpp 바이너리가 다운로드되어 {0}에 추출되었습니다.\nCUDA 파일이 {1}에 추출되었습니다." ) + self.CUDA_FILES_EXTRACTED = "CUDA 파일이 에 추출되었습니다." + self.NO_SUITABLE_CUDA_BACKEND_EXTRACTION = "추출에 적합한 CUDA 백엔드를 찾을 수 없습니다." self.ERROR_FETCHING_RELEASES = "릴리스를 가져오는 중 오류가 발생했습니다: {0}" self.CONFIRM_DELETION_TITLE = "삭제 확인" self.LOG_FOR = "{0}에 대한 로그" @@ -2789,13 +2769,11 @@ def __init__(self): self.TASK_PRESET_SAVED_TO = "작업 프리셋이 {0}에 저장되었습니다." self.RESTARTING_TASK = "작업을 다시 시작하는 중입니다: {0}" self.IN_PROGRESS = "진행 중" - self.DOWNLOAD_FINISHED_EXTRACTED_TO = ( - "다운로드가 완료되었습니다. 추출 위치: {0}" - ) - self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = "llama.cpp 바이너리가 다운로드되어 {0}에 추출되었습니다.\nCUDA 파일이 {1}에 추출되었습니다." - self.NO_SUITABLE_CUDA_BACKEND_FOUND = ( - "추출에 적합한 CUDA 백엔드를 찾을 수 없습니다." + self.DOWNLOAD_FINISHED_EXTRACTED_TO = "다운로드가 완료되었습니다. 추출 위치: {0}" + self.LLAMACPP_DOWNLOADED_AND_EXTRACTED = ( + "llama.cpp 바이너리가 다운로드되어 {0}에 추출되었습니다.\nCUDA 파일이 {1}에 추출되었습니다." ) + self.NO_SUITABLE_CUDA_BACKEND_FOUND = "추출에 적합한 CUDA 백엔드를 찾을 수 없습니다." self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = ( "llama.cpp 바이너리가 다운로드되어 {0}에 추출되었습니다." ) @@ -2832,14 +2810,10 @@ def __init__(self): self.INPUT_FILE_NOT_EXIST = "입력 파일 '{0}'이 존재하지 않습니다." self.QUANTIZING_MODEL_TO = "{0}을 {1}(으)로 양자화하는 중입니다." self.QUANTIZATION_TASK_STARTED = "{0}에 대한 양자화 작업이 시작되었습니다." - self.ERROR_STARTING_QUANTIZATION = ( - "양자화를 시작하는 중 오류가 발생했습니다: {0}" - ) + self.ERROR_STARTING_QUANTIZATION = "양자화를 시작하는 중 오류가 발생했습니다: {0}" self.UPDATING_MODEL_INFO = "모델 정보를 업데이트하는 중입니다: {0}" self.TASK_FINISHED = "작업이 완료되었습니다: {0}" - self.SHOWING_TASK_DETAILS_FOR = ( - "다음에 대한 작업 세부 정보를 표시하는 중입니다: {0}" - ) + self.SHOWING_TASK_DETAILS_FOR = "다음에 대한 작업 세부 정보를 표시하는 중입니다: {0}" self.BROWSING_FOR_IMATRIX_DATA_FILE = "IMatrix 데이터 파일을 찾아보는 중입니다." self.SELECT_DATA_FILE = "데이터 파일 선택" self.BROWSING_FOR_IMATRIX_MODEL_FILE = "IMatrix 모델 파일을 찾아보는 중입니다." @@ -2849,9 +2823,7 @@ def __init__(self): self.STARTING_IMATRIX_GENERATION = "IMatrix 생성을 시작하는 중입니다." self.BACKEND_PATH_NOT_EXIST = "백엔드 경로가 존재하지 않습니다: {0}" self.GENERATING_IMATRIX = "IMatrix를 생성하는 중입니다." - self.ERROR_STARTING_IMATRIX_GENERATION = ( - "IMatrix 생성을 시작하는 중 오류가 발생했습니다: {0}" - ) + self.ERROR_STARTING_IMATRIX_GENERATION = "IMatrix 생성을 시작하는 중 오류가 발생했습니다: {0}" self.IMATRIX_GENERATION_TASK_STARTED = "IMatrix 생성 작업이 시작되었습니다." self.ERROR_MESSAGE = "오류: {0}" self.TASK_ERROR = "작업 오류: {0}" @@ -2860,26 +2832,14 @@ def __init__(self): self.SELECT_QUANTIZATION_TYPE = "양자화 유형을 선택하세요." self.ALLOWS_REQUANTIZING = "이미 양자화된 텐서의 재양자화를 허용합니다." self.LEAVE_OUTPUT_WEIGHT = "output.weight를 (재)양자화하지 않은 상태로 둡니다." - self.DISABLE_K_QUANT_MIXTURES = ( - "k-양자 혼합을 비활성화하고 모든 텐서를 동일한 유형으로 양자화합니다." - ) - self.USE_DATA_AS_IMPORTANCE_MATRIX = ( - "양자 최적화를 위한 중요도 행렬로 파일의 데이터를 사용합니다." - ) - self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( - "이러한 텐서에 중요도 행렬을 사용합니다." - ) - self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( - "이러한 텐서에 중요도 행렬을 사용하지 않습니다." - ) + self.DISABLE_K_QUANT_MIXTURES = "k-양자 혼합을 비활성화하고 모든 텐서를 동일한 유형으로 양자화합니다." + self.USE_DATA_AS_IMPORTANCE_MATRIX = "양자 최적화를 위한 중요도 행렬로 파일의 데이터를 사용합니다." + self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = "이러한 텐서에 중요도 행렬을 사용합니다." + self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = "이러한 텐서에 중요도 행렬을 사용하지 않습니다." self.OUTPUT_TENSOR_TYPE = "출력 텐서 유형:" - self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = ( - "output.weight 텐서에 이 유형을 사용합니다." - ) + self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = "output.weight 텐서에 이 유형을 사용합니다." self.TOKEN_EMBEDDING_TYPE = "토큰 임베딩 유형:" - self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = ( - "토큰 임베딩 텐서에 이 유형을 사용합니다." - ) + self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = "토큰 임베딩 텐서에 이 유형을 사용합니다." self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = ( "입력과 동일한 샤드에 양자화된 모델을 생성합니다." ) @@ -3834,7 +3794,9 @@ def __init__(self): self.STARTING_IMATRIX_GENERATION = "IMatrix জেনারেশন শুরু হচ্ছে" self.BACKEND_PATH_NOT_EXIST = "ব্যাকএন্ড পাথ বিদ্যমান নেই: {0}" self.GENERATING_IMATRIX = "IMatrix তৈরি করা হচ্ছে" - self.ERROR_STARTING_IMATRIX_GENERATION = "IMatrix জেনারেশন শুরু করতে ত্রুটি: {0}" + self.ERROR_STARTING_IMATRIX_GENERATION = ( + "IMatrix জেনারেশন শুরু করতে ত্রুটি: {0}" + ) self.IMATRIX_GENERATION_TASK_STARTED = "IMatrix জেনারেশন টাস্ক শুরু হয়েছে" self.ERROR_MESSAGE = "ত্রুটি: {0}" self.TASK_ERROR = "টাস্ক ত্রুটি: {0}" @@ -3842,13 +3804,11 @@ def __init__(self): self.APPLICATION_CLOSED = "অ্যাপ্লিকেশন বন্ধ" self.SELECT_QUANTIZATION_TYPE = "কোয়ান্টাইজেশন ধরণ নির্বাচন করুন" self.ALLOWS_REQUANTIZING = "যে টেন্সরগুলি ইতিমধ্যে কোয়ান্টাইজ করা হয়েছে তাদের পুনরায় কোয়ান্টাইজ করার অনুমতি দেয়" - self.LEAVE_OUTPUT_WEIGHT = "output.weight কে (পুনরায়) কোয়ান্টাইজ না করে রেখে দেবে" - self.DISABLE_K_QUANT_MIXTURES = ( - "k-কোয়ান্ট মিশ্রণগুলি অক্ষম করুন এবং সমস্ত টেন্সরকে একই ধরণের কোয়ান্টাইজ করুন" - ) - self.USE_DATA_AS_IMPORTANCE_MATRIX = ( - "কোয়ান্ট অপ্টিমাইজেশনের জন্য ফাইলের ডেটা গুরুত্বপূর্ণ ম্যাট্রিক্স হিসাবে ব্যবহার করুন" + self.LEAVE_OUTPUT_WEIGHT = ( + "output.weight কে (পুনরায়) কোয়ান্টাইজ না করে রেখে দেবে" ) + self.DISABLE_K_QUANT_MIXTURES = "k-কোয়ান্ট মিশ্রণগুলি অক্ষম করুন এবং সমস্ত টেন্সরকে একই ধরণের কোয়ান্টাইজ করুন" + self.USE_DATA_AS_IMPORTANCE_MATRIX = "কোয়ান্ট অপ্টিমাইজেশনের জন্য ফাইলের ডেটা গুরুত্বপূর্ণ ম্যাট্রিক্স হিসাবে ব্যবহার করুন" self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = ( "এই টেন্সরগুলির জন্য গুরুত্বপূর্ণ ম্যাট্রিক্স ব্যবহার করুন" ) @@ -5952,9 +5912,7 @@ def __init__(self): "llama.cpp 二進位檔案已下載並解壓縮至 {0}\nCUDA 檔案已解壓縮至 {1}" ) self.NO_SUITABLE_CUDA_BACKEND_FOUND = "找不到合適的 CUDA 後端進行解壓縮" - self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = ( - "llama.cpp 二進位檔案已下載並解壓縮至 {0}" - ) + self.LLAMACPP_BINARY_DOWNLOADED_AND_EXTRACTED = "llama.cpp 二進位檔案已下載並解壓縮至 {0}" self.REFRESHING_LLAMACPP_RELEASES = "正在重新整理 llama.cpp 版本" self.UPDATING_ASSET_LIST = "正在更新資源清單" self.UPDATING_CUDA_OPTIONS = "正在更新 CUDA 選項" @@ -6011,18 +5969,14 @@ def __init__(self): self.ALLOWS_REQUANTIZING = "允許重新量化已量化的張量" self.LEAVE_OUTPUT_WEIGHT = "將保留 output.weight 不被(重新)量化" self.DISABLE_K_QUANT_MIXTURES = "停用 k-quant 混合並將所有張量量化為相同類型" - self.USE_DATA_AS_IMPORTANCE_MATRIX = ( - "使用檔案中的資料作為量化最佳化的重要性矩陣" - ) + self.USE_DATA_AS_IMPORTANCE_MATRIX = "使用檔案中的資料作為量化最佳化的重要性矩陣" self.USE_IMPORTANCE_MATRIX_FOR_TENSORS = "對這些張量使用重要性矩陣" self.DONT_USE_IMPORTANCE_MATRIX_FOR_TENSORS = "不要對這些張量使用重要性矩陣" self.OUTPUT_TENSOR_TYPE = "輸出張量類型:" self.USE_THIS_TYPE_FOR_OUTPUT_WEIGHT = "對 output.weight 張量使用此類型" self.TOKEN_EMBEDDING_TYPE = "權杖嵌入類型:" self.USE_THIS_TYPE_FOR_TOKEN_EMBEDDINGS = "對權杖嵌入張量使用此類型" - self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = ( - "將在與輸入相同的分片中產生量化模型" - ) + self.WILL_GENERATE_QUANTIZED_MODEL_IN_SAME_SHARDS = "將在與輸入相同的分片中產生量化模型" self.OVERRIDE_MODEL_METADATA = "覆蓋模型中繼資料" self.INPUT_DATA_FILE_FOR_IMATRIX = "IMatrix 產生的輸入資料檔案" self.MODEL_TO_BE_QUANTIZED = "要量化的模型"