-
Notifications
You must be signed in to change notification settings - Fork 0
fix quant config issue & ui error issues #7
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
9ffa884
6e725ee
2a8fb51
aed858d
96fcb3a
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 |
|---|---|---|
|
|
@@ -69,19 +69,35 @@ def start_quantization(): | |
| ui.label('Calibration Settings').classes('text-2xl font-bold') | ||
| ui.input('Calibration Dataset', placeholder='e.g., wikitext').classes('w-full').bind_value(form_data, 'calib_dataset') | ||
| ui.input('Dataset Config', placeholder='e.g., wikitext-2-raw-v1 (optional)').classes('w-full').bind_value(form_data, 'calib_config') | ||
| ui.input('Dataset Split', placeholder='e.g., train (optional)').classes('w-full').bind_value(form_data, 'calib_split') | ||
|
|
||
| ui.select( | ||
| ['train', 'test', 'validation', 'train[:512]', 'test[:512]'], | ||
| value='train', | ||
| label='Dataset Split' | ||
| ).classes('w-full').bind_value(form_data, 'calib_split').props('use-input new-value-mode=add-unique clearable') | ||
|
|
||
| with ui.row().classes('w-full gap-4'): | ||
| ui.number('Max Calibration Samples', value=256, min=1, max=10000).classes('flex-1').bind_value(form_data, 'max_calib_samples') | ||
| ui.number('Max Sequence Length', value=2048, min=128, max=8192).classes('flex-1').bind_value(form_data, 'max_seq_length') | ||
| ui.select( | ||
| [128, 256, 512, 1024, 2048], | ||
| value=256, | ||
| label='Max Calibration Samples' | ||
| ).classes('flex-1').bind_value(form_data, 'max_calib_samples').props('use-input new-value-mode=add-unique') | ||
| ui.select( | ||
| [512, 1024, 2048, 4096, 8192], | ||
| value=2048, | ||
| label='Max Sequence Length' | ||
| ).classes('flex-1').bind_value(form_data, 'max_seq_length').props('use-input new-value-mode=add-unique') | ||
|
Comment on lines
+79
to
+88
|
||
|
|
||
| ui.separator() | ||
|
|
||
| # AWQ-specific settings | ||
| ui.label('AWQ Settings (only for AWQ method)').classes('text-2xl font-bold') | ||
| with ui.row().classes('w-full gap-4'): | ||
| ui.select([2, 3, 4, 5, 8], value=4, label='Weight Bits').classes('flex-1').bind_value(form_data, 'w_bit') | ||
| ui.number('Group Size', value=128, min=1).classes('flex-1').bind_value(form_data, 'group_size') | ||
| ui.select( | ||
| [32, 64, 128, 256], | ||
| value=128, | ||
| label='Group Size' | ||
| ).classes('flex-1').bind_value(form_data, 'group_size').props('use-input new-value-mode=add-unique') | ||
|
Comment on lines
+96
to
+100
|
||
| ui.checkbox('Zero Point', value=True).bind_value(form_data, 'zero_point') | ||
|
|
||
| ui.separator() | ||
|
|
||
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 select component allows custom input via
new-value-mode=add-unique, which means users can enter non-integer values. Combined with theint()conversion in config.py line 38-39, this could cause runtime errors when processing custom dataset split strings like 'train[:512]'. Consider validating the input or documenting that dataset split values are strings and should not be converted to integers.