[optim] clean apollo (#6645)
* clean apollo code * update readme Former-commit-id: 38b8ec4a99189483124b54df9d6bc6b0d318855a
This commit is contained in:
@@ -234,8 +234,8 @@ def create_train_tab(engine: "Engine") -> Dict[str, "Component"]:
|
||||
with gr.Row():
|
||||
use_galore = gr.Checkbox()
|
||||
galore_rank = gr.Slider(minimum=1, maximum=1024, value=16, step=1)
|
||||
galore_update_interval = gr.Slider(minimum=1, maximum=1024, value=200, step=1)
|
||||
galore_scale = gr.Slider(minimum=0, maximum=1, value=0.25, step=0.01)
|
||||
galore_update_interval = gr.Slider(minimum=1, maximum=2048, value=200, step=1)
|
||||
galore_scale = gr.Slider(minimum=0, maximum=100, value=2.0, step=0.1)
|
||||
galore_target = gr.Textbox(value="all")
|
||||
|
||||
input_elems.update({use_galore, galore_rank, galore_update_interval, galore_scale, galore_target})
|
||||
@@ -254,9 +254,10 @@ def create_train_tab(engine: "Engine") -> Dict[str, "Component"]:
|
||||
with gr.Row():
|
||||
use_apollo = gr.Checkbox()
|
||||
apollo_rank = gr.Slider(minimum=1, maximum=1024, value=16, step=1)
|
||||
apollo_update_interval = gr.Slider(minimum=1, maximum=1024, value=200, step=1)
|
||||
apollo_scale = gr.Slider(minimum=0, maximum=1, value=0.25, step=0.01)
|
||||
apollo_update_interval = gr.Slider(minimum=1, maximum=2048, value=200, step=1)
|
||||
apollo_scale = gr.Slider(minimum=0, maximum=100, value=32.0, step=0.1)
|
||||
apollo_target = gr.Textbox(value="all")
|
||||
|
||||
input_elems.update({use_apollo, apollo_rank, apollo_update_interval, apollo_scale, apollo_target})
|
||||
elem_dict.update(
|
||||
dict(
|
||||
|
||||
@@ -1162,19 +1162,19 @@ LOCALES = {
|
||||
"use_galore": {
|
||||
"en": {
|
||||
"label": "Use GaLore",
|
||||
"info": "Enable gradient low-Rank projection.",
|
||||
"info": "Use GaLore optimizer.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать GaLore",
|
||||
"info": "Включить проекцию градиента на низкоранговое пространство.",
|
||||
"info": "Используйте оптимизатор GaLore.",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 GaLore",
|
||||
"info": "使用梯度低秩投影。",
|
||||
"info": "使用 GaLore 优化器。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "GaLore 사용",
|
||||
"info": "그레디언트 로우 랭크 프로젝션을 활성화합니다.",
|
||||
"info": "GaLore 최적화를 사용하세요.",
|
||||
},
|
||||
},
|
||||
"galore_rank": {
|
||||
@@ -1266,19 +1266,19 @@ LOCALES = {
|
||||
"use_apollo": {
|
||||
"en": {
|
||||
"label": "Use APOLLO",
|
||||
"info": "Enable gradient low-Rank projection.",
|
||||
"info": "Use APOLLO optimizer.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать APOLLO",
|
||||
"info": "Включить проекцию градиента на низкоранговое пространство.",
|
||||
"info": "Используйте оптимизатор APOLLO.",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 APOLLO",
|
||||
"info": "使用梯度低秩投影。",
|
||||
"info": "使用 APOLLO 优化器。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "APOLLO 사용",
|
||||
"info": "그레디언트 로우 랭크 프로젝션을 활성화합니다.",
|
||||
"info": "APOLLO 최적화를 사용하세요.",
|
||||
},
|
||||
},
|
||||
"apollo_rank": {
|
||||
|
||||
@@ -224,7 +224,7 @@ class Runner:
|
||||
args["galore_update_interval"] = get("train.galore_update_interval")
|
||||
args["galore_scale"] = get("train.galore_scale")
|
||||
args["galore_target"] = get("train.galore_target")
|
||||
|
||||
|
||||
# apollo config
|
||||
if args["use_apollo"]:
|
||||
args["apollo_rank"] = get("train.apollo_rank")
|
||||
|
||||
Reference in New Issue
Block a user