-
Notifications
You must be signed in to change notification settings - Fork 0
Implement model quantization format support #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,8 @@ def create_configure_page(job_service: JobService, storage_service: StorageServi | |||||
| 'w_bit': 4, | ||||||
| 'group_size': 128, | ||||||
| 'zero_point': True, | ||||||
| 'gguf_quant_type': 'Q4_K_M', | ||||||
| 'gguf_intermediate_format': 'f16', | ||||||
| } | ||||||
|
|
||||||
| def start_quantization(): | ||||||
|
|
@@ -37,6 +39,8 @@ def start_quantization(): | |||||
| w_bit=form_data['w_bit'], | ||||||
| group_size=form_data['group_size'], | ||||||
| zero_point=form_data['zero_point'], | ||||||
| gguf_quant_type=form_data['gguf_quant_type'], | ||||||
| gguf_intermediate_format=form_data['gguf_intermediate_format'], | ||||||
| ) | ||||||
|
|
||||||
| if job_service.start_job(config): | ||||||
|
|
@@ -61,7 +65,7 @@ def start_quantization(): | |||||
| # Quantization method | ||||||
| ui.label('Quantization Method').classes('text-2xl font-bold') | ||||||
| with ui.row().classes('w-full gap-4'): | ||||||
| ui.radio(['awq', 'nvfp4'], value='awq').bind_value(form_data, 'quant_method').props('inline') | ||||||
| ui.radio(['awq', 'nvfp4', 'gguf'], value='awq').bind_value(form_data, 'quant_method').props('inline') | ||||||
|
|
||||||
| ui.separator() | ||||||
|
|
||||||
|
|
@@ -99,9 +103,32 @@ def start_quantization(): | |||||
| label='Group Size' | ||||||
| ).classes('flex-1').bind_value(form_data, 'group_size').props('use-input new-value-mode=add-unique') | ||||||
| ui.checkbox('Zero Point', value=True).bind_value(form_data, 'zero_point') | ||||||
|
|
||||||
| ui.separator() | ||||||
|
|
||||||
|
|
||||||
| # GGUF-specific settings | ||||||
| ui.label('GGUF Settings (only for GGUF method)').classes('text-2xl font-bold') | ||||||
| with ui.row().classes('w-full gap-4'): | ||||||
| ui.select( | ||||||
| ['Q2_K', 'Q3_K_S', 'Q3_K_M', 'Q3_K_L', 'Q4_0', 'Q4_1', 'Q4_K_S', 'Q4_K_M', | ||||||
| 'Q5_0', 'Q5_1', 'Q5_K_S', 'Q5_K_M', 'Q6_K', 'Q8_0', 'F16', 'F32'], | ||||||
| value='Q4_K_M', | ||||||
| label='Quantization Type' | ||||||
| ).classes('flex-1').bind_value(form_data, 'gguf_quant_type') | ||||||
| ui.select( | ||||||
| ['f16', 'f32', 'q8_0'], | ||||||
| value='f16', | ||||||
| label='Intermediate Format' | ||||||
| ).classes('flex-1').bind_value(form_data, 'gguf_intermediate_format') | ||||||
| ui.html(''' | ||||||
| <p class="text-sm text-gray-600"> | ||||||
| <strong>Recommended:</strong> Q4_K_M (balanced), Q5_K_M (best quality)<br> | ||||||
| <strong>Intermediate:</strong> f16 (default), f32 (higher precision), q8_0 (smaller) | ||||||
| </p> | ||||||
| ''', sanitize=False) | ||||||
|
||||||
| ''', sanitize=False) | |
| ''') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
LLAMA_CPP_VERSIONvalue 'b6945' appears to be a commit hash or short version identifier, but it's not clear what full version this corresponds to or why this specific version was chosen. Consider adding a comment explaining the version selection rationale (e.g., 'Using b6945 for stability/compatibility with feature X') to help maintainers understand the version choice when updating dependencies.