This commit is contained in:
tuna2134
2026-07-20 21:25:49 +09:00
parent 0c2be00f0a
commit b8ce11605c
17 changed files with 496 additions and 38 deletions

View File

@@ -279,6 +279,13 @@
"# JP-Extra (日本語特化版)を使うかどうか。日本語の能力が向上する代わりに英語と中国語は使えなくなります。\n",
"use_jp_extra = True\n",
"\n",
"# Matcha Flow + Differential Attention V2だけを既存モデルへFTする場合はTrue\n",
"# 初回はTrueを推奨。収束後の全体FTではFalseに戻し、学習率を下げてください。\n",
"matcha_only = True\n",
"\n",
"# Matcha-only FTの学習率。全体FTへ移行するときは2e-5程度まで下げることを推奨\n",
"learning_rate = 1e-4\n",
"\n",
"# 学習のバッチサイズ。VRAMのはみ出具合に応じて調整してください。\n",
"batch_size = 4\n",
"\n",
@@ -344,6 +351,7 @@
" val_per_lang=0,\n",
" log_interval=200,\n",
" yomi_error=yomi_error,\n",
" matcha_only=matcha_only,\n",
")"
]
},
@@ -381,6 +389,16 @@
"dataset_path = str(paths.dataset_path)\n",
"config_path = str(paths.config_path)\n",
"\n",
"from pathlib import Path\n",
"from configure_matcha_ft import configure_matcha_ft\n",
"configure_matcha_ft(\n",
" Path(config_path),\n",
" matcha_only=matcha_only,\n",
" learning_rate=learning_rate,\n",
" epochs=epochs,\n",
" save_every_steps=save_every_steps,\n",
")\n",
"\n",
"with open(\"default_config.yml\", \"r\", encoding=\"utf-8\") as f:\n",
" yml_data = yaml.safe_load(f)\n",
"yml_data[\"model_name\"] = model_name\n",