zetavg commited on
Commit
3889cb7
1 Parent(s): 350cbe9

update tooltips

Browse files
llama_lora/ui/finetune_ui.py CHANGED
@@ -858,7 +858,8 @@ def finetune_ui():
858
  evaluate_data_count = gr.Slider(
859
  minimum=0, maximum=1, step=1, value=0,
860
  label="Evaluation Data Count",
861
- info="The number of data to be used for evaluation. This amount of data will not be used for training and will be used to assess the performance of the model during the process."
 
862
  )
863
 
864
  with gr.Box(elem_id="finetune_continue_from_model_box"):
@@ -870,7 +871,10 @@ def finetune_ui():
870
  elem_id="finetune_continue_from_model"
871
  )
872
  continue_from_checkpoint = gr.Dropdown(
873
- value="-", label="Checkpoint", choices=["-"])
 
 
 
874
  with gr.Column():
875
  load_params_from_model_btn = gr.Button(
876
  "Load training parameters from selected model", visible=False)
@@ -911,8 +915,6 @@ def finetune_ui():
911
  info="The dropout probability for LoRA, which controls the fraction of LoRA parameters that are set to zero during training. A larger lora_dropout increases the regularization effect of LoRA but also increases the risk of underfitting."
912
  )
913
 
914
- lora_target_module_choices = gr.State(value=default_lora_target_module_choices)
915
-
916
  lora_target_modules = gr.CheckboxGroup(
917
  label="LoRA Target Modules",
918
  choices=default_lora_target_module_choices,
@@ -920,6 +922,7 @@ def finetune_ui():
920
  info="Modules to replace with LoRA.",
921
  elem_id="finetune_lora_target_modules"
922
  )
 
923
  with gr.Box(elem_id="finetune_lora_target_modules_add_box"):
924
  with gr.Row():
925
  lora_target_modules_add = gr.Textbox(
@@ -1136,6 +1139,14 @@ def finetune_ui():
1136
  'Press to load a sample dataset of the current selected format into the textbox.',
1137
  });
1138
 
 
 
 
 
 
 
 
 
1139
  tippy('#finetune_save_total_limit', {
1140
  placement: 'bottom',
1141
  delay: [500, 0],
@@ -1165,6 +1176,24 @@ def finetune_ui():
1165
  content:
1166
  'The name of the new LoRA model. Must be unique.',
1167
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1168
  }, 100);
1169
 
1170
  // Show/hide start and stop button base on the state.
 
858
  evaluate_data_count = gr.Slider(
859
  minimum=0, maximum=1, step=1, value=0,
860
  label="Evaluation Data Count",
861
+ info="The number of data to be used for evaluation. This specific amount of data will be randomly chosen from the training dataset for evaluating the model's performance during the process, without contributing to the actual training.",
862
+ elem_id="finetune_evaluate_data_count"
863
  )
864
 
865
  with gr.Box(elem_id="finetune_continue_from_model_box"):
 
871
  elem_id="finetune_continue_from_model"
872
  )
873
  continue_from_checkpoint = gr.Dropdown(
874
+ value="-",
875
+ label="Resume from Checkpoint",
876
+ choices=["-"],
877
+ elem_id="finetune_continue_from_checkpoint")
878
  with gr.Column():
879
  load_params_from_model_btn = gr.Button(
880
  "Load training parameters from selected model", visible=False)
 
915
  info="The dropout probability for LoRA, which controls the fraction of LoRA parameters that are set to zero during training. A larger lora_dropout increases the regularization effect of LoRA but also increases the risk of underfitting."
916
  )
917
 
 
 
918
  lora_target_modules = gr.CheckboxGroup(
919
  label="LoRA Target Modules",
920
  choices=default_lora_target_module_choices,
 
922
  info="Modules to replace with LoRA.",
923
  elem_id="finetune_lora_target_modules"
924
  )
925
+ lora_target_module_choices = gr.State(value=default_lora_target_module_choices)
926
  with gr.Box(elem_id="finetune_lora_target_modules_add_box"):
927
  with gr.Row():
928
  lora_target_modules_add = gr.Textbox(
 
1139
  'Press to load a sample dataset of the current selected format into the textbox.',
1140
  });
1141
 
1142
+ tippy('#finetune_evaluate_data_count', {
1143
+ placement: 'bottom',
1144
+ delay: [500, 0],
1145
+ animation: 'scale-subtle',
1146
+ content:
1147
+ 'While setting a value larger than 0, the checkpoint with the lowest loss on the evaluation data will be saved as the final trained model, thereby helping to prevent overfitting.',
1148
+ });
1149
+
1150
  tippy('#finetune_save_total_limit', {
1151
  placement: 'bottom',
1152
  delay: [500, 0],
 
1176
  content:
1177
  'The name of the new LoRA model. Must be unique.',
1178
  });
1179
+
1180
+ tippy('#finetune_continue_from_model', {
1181
+ placement: 'bottom',
1182
+ delay: [500, 0],
1183
+ animation: 'scale-subtle',
1184
+ content:
1185
+ 'Select a LoRA model to train a new model on top of that model.<br /><br />💡 To use the same training parameters of a previously trained model, select it here and click the <code>Load training parameters from selected model</code> button, then un-select it.',
1186
+ allowHTML: true,
1187
+ });
1188
+
1189
+ tippy('#finetune_continue_from_checkpoint', {
1190
+ placement: 'bottom',
1191
+ delay: [500, 0],
1192
+ animation: 'scale-subtle',
1193
+ content:
1194
+ 'If a checkpoint is selected, training will resume from that specific checkpoint, bypassing any previously completed steps up to the checkpoint\\'s moment. <br /><br />💡 Use this option to resume an unfinished training session. Remember to click the <code>Load training parameters from selected model</code> button to load the training parameters of the selected model.',
1195
+ allowHTML: true,
1196
+ });
1197
  }, 100);
1198
 
1199
  // Show/hide start and stop button base on the state.
llama_lora/ui/inference_ui.py CHANGED
@@ -326,7 +326,7 @@ def inference_ui():
326
  # with gr.Column():
327
  with gr.Accordion("Options", open=True, elem_id="inference_options_accordion"):
328
  temperature = gr.Slider(
329
- minimum=0, maximum=2, value=0.1, step=0.01,
330
  label="Temperature",
331
  elem_id="inference_temperature"
332
  )
@@ -345,7 +345,7 @@ def inference_ui():
345
  )
346
 
347
  num_beams = gr.Slider(
348
- minimum=1, maximum=5, value=1, step=1,
349
  label="Beams",
350
  elem_id="inference_beams"
351
  )
@@ -538,7 +538,8 @@ def inference_ui():
538
  delay: [500, 0],
539
  animation: 'scale-subtle',
540
  content:
541
- 'Controls randomness: Lowering results in less random completions. Higher values (e.g., 1.0) make the model generate more diverse and random outputs. As the temperature approaches zero, the model will become deterministic and repetitive.',
 
542
  });
543
 
544
  tippy('#inference_top_p', {
@@ -546,7 +547,8 @@ def inference_ui():
546
  delay: [500, 0],
547
  animation: 'scale-subtle',
548
  content:
549
- 'Controls diversity via nucleus sampling: only the tokens whose cumulative probability exceeds "top_p" are considered. 0.5 means half of all likelihood-weighted options are considered.',
 
550
  });
551
 
552
  tippy('#inference_top_k', {
@@ -554,7 +556,8 @@ def inference_ui():
554
  delay: [500, 0],
555
  animation: 'scale-subtle',
556
  content:
557
- 'Controls diversity of the generated text by only considering the "top_k" tokens with the highest probabilities. This method can lead to more focused and coherent outputs by reducing the impact of low probability tokens.',
 
558
  });
559
 
560
  tippy('#inference_beams', {
 
326
  # with gr.Column():
327
  with gr.Accordion("Options", open=True, elem_id="inference_options_accordion"):
328
  temperature = gr.Slider(
329
+ minimum=0, maximum=2, value=0, step=0.01,
330
  label="Temperature",
331
  elem_id="inference_temperature"
332
  )
 
345
  )
346
 
347
  num_beams = gr.Slider(
348
+ minimum=1, maximum=5, value=2, step=1,
349
  label="Beams",
350
  elem_id="inference_beams"
351
  )
 
538
  delay: [500, 0],
539
  animation: 'scale-subtle',
540
  content:
541
+ '<strong>Controls randomness</strong>: Higher values (e.g., <code>1.0</code>) make the model generate more diverse and random outputs. As the temperature approaches zero, the model will become deterministic and repetitive.<br /><i>Setting a value larger then <code>0</code> will enable sampling.</i>',
542
+ allowHTML: true,
543
  });
544
 
545
  tippy('#inference_top_p', {
 
547
  delay: [500, 0],
548
  animation: 'scale-subtle',
549
  content:
550
+ 'Controls diversity via nucleus sampling: only the tokens whose cumulative probability exceeds <code>top_p</code> are considered. <code>0.5</code> means half of all likelihood-weighted options are considered.<br />Will only take effect if Temperature is set to > 0.',
551
+ allowHTML: true,
552
  });
553
 
554
  tippy('#inference_top_k', {
 
556
  delay: [500, 0],
557
  animation: 'scale-subtle',
558
  content:
559
+ 'Controls diversity of the generated text by only considering the <code>top_k</code> tokens with the highest probabilities. This method can lead to more focused and coherent outputs by reducing the impact of low probability tokens.<br />Will only take effect if Temperature is set to > 0.',
560
+ allowHTML: true,
561
  });
562
 
563
  tippy('#inference_beams', {
llama_lora/ui/main_page.py CHANGED
@@ -134,6 +134,10 @@ def main_page_custom_css():
134
  border: 1px solid var(--border-color-primary);
135
  border-radius: 4px;
136
  box-shadow: 0 2px 20px rgba(5,5,5,.08);
 
 
 
 
137
  }
138
  .tippy-arrow {
139
  color: var(--block-background-fill);
@@ -144,6 +148,45 @@ def main_page_custom_css():
144
  font-weight: 100;
145
  }
146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  /*
148
  .codemirror-wrapper .cm-editor .cm-gutters {
149
  background-color: var(--background-fill-secondary);
 
134
  border: 1px solid var(--border-color-primary);
135
  border-radius: 4px;
136
  box-shadow: 0 2px 20px rgba(5,5,5,.08);
137
+ /* box-shadow: var(--shadow-drop-lg); */
138
+ }
139
+ body.dark .tippy-box {
140
+ box-shadow: 0 0 8px rgba(160,160,160,0.12);
141
  }
142
  .tippy-arrow {
143
  color: var(--block-background-fill);
 
148
  font-weight: 100;
149
  }
150
 
151
+ .tippy-arrow::before {
152
+ z-index: 1;
153
+ }
154
+ .tippy-arrow::after {
155
+ content: "";
156
+ position: absolute;
157
+ z-index: -1;
158
+ border-color: transparent;
159
+ border-style: solid;
160
+ }
161
+ .tippy-box[data-placement^=top]> .tippy-arrow::after {
162
+ bottom: -9px;
163
+ left: -1px;
164
+ border-width: 9px 9px 0;
165
+ border-top-color: var(--border-color-primary);
166
+ transform-origin: center top;
167
+ }
168
+ .tippy-box[data-placement^=bottom]> .tippy-arrow::after {
169
+ top: -9px;
170
+ left: -1px;
171
+ border-width: 0 9px 9px;
172
+ border-bottom-color: var(--border-color-primary);
173
+ transform-origin: center bottom;
174
+ }
175
+ .tippy-box[data-placement^=left]> .tippy-arrow:after {
176
+ border-width: 9px 0 9px 9px;
177
+ border-left-color: var(--border-color-primary);
178
+ top: -1px;
179
+ right: -9px;
180
+ transform-origin: center left;
181
+ }
182
+ .tippy-box[data-placement^=right]> .tippy-arrow::after {
183
+ top: -1px;
184
+ left: -9px;
185
+ border-width: 9px 9px 9px 0;
186
+ border-right-color: var(--border-color-primary);
187
+ transform-origin: center right;
188
+ }
189
+
190
  /*
191
  .codemirror-wrapper .cm-editor .cm-gutters {
192
  background-color: var(--background-fill-secondary);