Skip to content

Commit

Permalink
add parameters step rate increase for all algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
Pop John committed Aug 28, 2024
1 parent de6aca0 commit 18d2389
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions backend/src/constants/parametersConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'weight',
defaultValue: 0.01,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Weight of Rounding Cost',
placeholder: 'Enter weight of rounding cost',
Expand Down Expand Up @@ -141,6 +142,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'warmup',
defaultValue: 0.2,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Warmup Period',
placeholder: 'Enter warmup period',
Expand All @@ -152,6 +154,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'lr',
defaultValue: 4e-5,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Learning Rate for LSQ',
placeholder: 'Enter learning rate for LSQ',
Expand Down Expand Up @@ -202,6 +205,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Probability',
placeholder: 'Enter probability',
Expand All @@ -213,6 +217,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'input_prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Input Probability',
placeholder: 'Enter input probability',
Expand Down Expand Up @@ -315,6 +320,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'weight',
defaultValue: 0.01,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Weight of Rounding Cost',
placeholder: 'Enter weight of rounding cost',
Expand Down Expand Up @@ -356,6 +362,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'warmup',
defaultValue: 0.2,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Warmup Period',
placeholder: 'Enter warmup period',
Expand All @@ -367,6 +374,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'lr',
defaultValue: 4e-5,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Learning Rate for LSQ',
placeholder: 'Enter learning rate for LSQ',
Expand Down Expand Up @@ -433,6 +441,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Probability',
placeholder: 'Enter probability',
Expand All @@ -444,6 +453,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'input_prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Input Probability',
placeholder: 'Enter input probability',
Expand Down Expand Up @@ -546,6 +556,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'weight',
defaultValue: 0.01,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Weight of Rounding Cost',
placeholder: 'Enter weight of rounding cost',
Expand Down Expand Up @@ -579,6 +590,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'warmup',
defaultValue: 0.2,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Warmup Period',
placeholder: 'Enter warmup period',
Expand All @@ -590,6 +602,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'lr',
defaultValue: 4e-5,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Learning Rate for LSQ',
placeholder: 'Enter learning rate for LSQ',
Expand Down Expand Up @@ -640,6 +653,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Probability',
placeholder: 'Enter probability',
Expand All @@ -651,6 +665,7 @@ const QUANTIZATION_PARAMETERS = {
{
argName: 'input_prob',
defaultValue: 1.0,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Input Probability',
placeholder: 'Enter input probability',
Expand All @@ -667,6 +682,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand Down Expand Up @@ -700,6 +716,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.2,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand All @@ -724,6 +741,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -736,6 +754,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.99,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand Down Expand Up @@ -796,6 +815,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -807,6 +827,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.99,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand Down Expand Up @@ -865,6 +886,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -876,6 +898,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.99,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand Down Expand Up @@ -1003,6 +1026,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -1014,6 +1038,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.99,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand Down Expand Up @@ -1072,6 +1097,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand Down Expand Up @@ -1139,6 +1165,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.2,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand All @@ -1163,6 +1190,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -1174,6 +1202,7 @@ const PRUNING_PARAMETERS = {
{
argName: 'pruning_ratio',
defaultValue: 0.99,
inputArrowsStepRate: 0.01,
inputType: 'number',
label: 'Pruning Ratio',
placeholder: 'Enter pruning ratio',
Expand Down Expand Up @@ -1328,6 +1357,7 @@ const TRAIN_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -1352,6 +1382,7 @@ const TRAIN_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand All @@ -1376,6 +1407,7 @@ const TRAIN_PARAMETERS = {
{
argName: 'lr',
defaultValue: 0.1,
inputArrowsStepRate: 0.1,
inputType: 'number',
label: 'Learning Rate',
placeholder: 'Enter learning rate',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
msErrorDisplay
[formControlName]="i"
[placeholder]="param.placeholder"
[type]="param.inputType" />
[type]="param.inputType"
[step]="param.inputArrowsStepRate || 1" />
<mat-icon fontSet="ms" fontIcon="icon-Info" matSuffix matTooltip="{{ param.help }}"></mat-icon>
</mat-form-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface ParametersDto {
argName: string;
defaultValue: number | string;
inputType: 'text' | 'number' | 'select' | 'checkbox';
inputArrowsStepRate?: number;
label: string;
placeholder: string;
help: string;
Expand Down

0 comments on commit 18d2389

Please sign in to comment.