diff --git a/src/model/templates/base.html b/src/model/templates/base.html index b3dde16..5042d5e 100644 --- a/src/model/templates/base.html +++ b/src/model/templates/base.html @@ -1,256 +1,245 @@ - - - - - - {% block title %}AI模型训练监控看板{% endblock %} - - - - - - - {% block extra_css %}{% endblock %} - - - - -
-
- {% block content %}{% endblock %} -
-
- - - - - - {% block extra_js %}{% endblock %} - + + +
+
{% block content %}{% endblock %}
+
+ + + + + + {% block extra_js %}{% endblock %} + diff --git a/src/model/templates/index.html b/src/model/templates/index.html index 8d016b8..e2cb27f 100644 --- a/src/model/templates/index.html +++ b/src/model/templates/index.html @@ -1,60 +1,116 @@ -{% extends "base.html" %} - -{% block content %} -
-
+{% extends "base.html" %} {% block content %} +
+
- +
-
+ - -
+ +
- +
- -
+ +
-
- +
0
@@ -86,23 +142,30 @@
- +
-
0.0000
+
+ 0.0000 +
训练损失
- +
-
0.0000
+
+ 0.0000 +
训练准确率
-
+
- +
0.0000
@@ -110,23 +173,33 @@
- +
-
0.0000
+
+ 0.0000 +
评估准确率
-
+
- +
-
0.00e+0
+
+ 0.00e+0 +
学习率
-
+
- +
0
@@ -138,39 +211,39 @@
- +
-
+

损失曲线

- +
-
+

准确率曲线

- +
-
+

学习率变化

- +
-
-

数据详情

-
+
+

数据详情

+
-
+
@@ -186,35 +259,19 @@ - +
加载数据中... + 加载数据中... +
- +
-{% endblock %} - -{% block extra_js %} +{% endblock %} {% block extra_js %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/model/trainer.py b/src/model/trainer.py index 7b384d6..3c9a4f5 100644 --- a/src/model/trainer.py +++ b/src/model/trainer.py @@ -1232,25 +1232,10 @@ def expand_and_train( num_experts: int = typer.Option(20, "--num-experts", help="MoE专家数量"), max_seq_len: int = typer.Option(128, "--max-seq-len", help="最大序列长度"), use_pinyin: bool = typer.Option(False, "--use-pinyin", help="是否使用拼音特征"), - # 两阶段训练参数 - frozen_patience: int = typer.Option( - 10, - "--frozen-patience", - help="冻结阶段验证损失连续不下降的epoch数,触发切换到全量微调", - ), - frozen_lr: float = typer.Option(1e-3, "--frozen-lr", help="冻结阶段学习率"), - full_lr: float = typer.Option(1e-4, "--full-lr", help="全量微调阶段学习率"), - frozen_scheduler: str = typer.Option( - "cosine", "--frozen-scheduler", help="冻结阶段学习率调度器类型:cosine或plateau" - ), - full_scheduler: str = typer.Option( - "cosine", - "--full-scheduler", - help="全量微调阶段学习率调度器类型:cosine或plateau", - ), # 训练参数 batch_size: int = typer.Option(128, "--batch-size", "-b", help="批次大小"), num_epochs: int = typer.Option(10, "--num-epochs", help="训练轮数"), + learning_rate: float = typer.Option(1e-5, "--learning-rate", "-lr", help="学习率"), min_learning_rate: float = typer.Option( 1e-9, "--min-learning-rate", help="最小学习率" ),