forked from hiyouga/ChatGLM-Efficient-Tuning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
191 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from glmtuner.webui.components.eval import create_eval_tab | ||
from glmtuner.webui.components.infer import create_infer_tab | ||
from glmtuner.webui.components.top import create_top | ||
from glmtuner.webui.components.sft import create_sft_tab | ||
from glmtuner.webui.components.eval import create_eval_tab | ||
from glmtuner.webui.components.infer import create_infer_tab | ||
from glmtuner.webui.components.export import create_export_tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from typing import Dict | ||
import gradio as gr | ||
from gradio.components import Component | ||
|
||
from glmtuner.webui.utils import export_model | ||
|
||
|
||
def create_export_tab(top_elems: Dict[str, Component]) -> Dict[str, Component]: | ||
with gr.Row(): | ||
save_dir = gr.Textbox() | ||
max_shard_size = gr.Slider(value=10, minimum=1, maximum=100) | ||
|
||
export_btn = gr.Button() | ||
info_box = gr.Textbox(show_label=False, interactive=False) | ||
|
||
export_btn.click( | ||
export_model, | ||
[ | ||
top_elems["lang"], | ||
top_elems["model_name"], | ||
top_elems["checkpoints"], | ||
top_elems["finetuning_type"], | ||
max_shard_size, | ||
save_dir | ||
], | ||
[info_box] | ||
) | ||
|
||
return dict( | ||
save_dir=save_dir, | ||
max_shard_size=max_shard_size, | ||
export_btn=export_btn, | ||
info_box=info_box | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters