Spaces:
Running
Running
yasu-oh
commited on
Commit
·
24d7730
1
Parent(s):
2f35dc4
MULT
Browse files
app.py
CHANGED
@@ -37,6 +37,9 @@ COMMENT = {
|
|
37 |
"U64": "INT64の処理能力が高いGPUを選定してください。",
|
38 |
"F64": "FP64の処理能力が高いGPUを選定してください。",
|
39 |
}
|
|
|
|
|
|
|
40 |
|
41 |
def get_model_api_info(model_name: str) -> dict:
|
42 |
"""
|
@@ -96,9 +99,9 @@ def estimate_gpu_memory(model_name: str) -> str:
|
|
96 |
result_lines.append(f"参考までに、該当リポジトリのファイルサイズは合計 {usedStorage_gb:.2f} GBです。")
|
97 |
result_lines.append("")
|
98 |
result_lines.append("これを全てモデルのデータとして仮定した場合、推論及び、トレーニングに必要な概算のGPUメモリサイズは")
|
99 |
-
result_lines.append(f"【推論】約 {usedStorage_gb *
|
100 |
-
result_lines.append(f"【トレーニング(LoRA)】約 {usedStorage_gb *
|
101 |
-
result_lines.append(f"【トレーニング(フルパラメータ)】約 {usedStorage_gb *
|
102 |
result_lines.append("となります。")
|
103 |
return "\n".join(result_lines)
|
104 |
|
@@ -123,9 +126,9 @@ def estimate_gpu_memory(model_name: str) -> str:
|
|
123 |
result_lines.append(f"これらを合算するとモデルのデータサイズは約 {estimated_gb:.2f} GB です。")
|
124 |
result_lines.append("")
|
125 |
result_lines.append("推論及び、トレーニングに必要な概算のGPUメモリサイズは")
|
126 |
-
result_lines.append(f"【推論】約 {estimated_gb *
|
127 |
-
result_lines.append(f"【トレーニング(LoRA)】約 {estimated_gb *
|
128 |
-
result_lines.append(f"【トレーニング(フルパラメータ)】約 {estimated_gb *
|
129 |
result_lines.append("となります。")
|
130 |
|
131 |
# GPU選定のコメント
|
|
|
37 |
"U64": "INT64の処理能力が高いGPUを選定してください。",
|
38 |
"F64": "FP64の処理能力が高いGPUを選定してください。",
|
39 |
}
|
40 |
+
INF_MULT = 1.25
|
41 |
+
LORA_MULT = 1.6
|
42 |
+
FULL_MULT = 4
|
43 |
|
44 |
def get_model_api_info(model_name: str) -> dict:
|
45 |
"""
|
|
|
99 |
result_lines.append(f"参考までに、該当リポジトリのファイルサイズは合計 {usedStorage_gb:.2f} GBです。")
|
100 |
result_lines.append("")
|
101 |
result_lines.append("これを全てモデルのデータとして仮定した場合、推論及び、トレーニングに必要な概算のGPUメモリサイズは")
|
102 |
+
result_lines.append(f"【推論】約 {usedStorage_gb * INF_MULT:.2f} GB")
|
103 |
+
result_lines.append(f"【トレーニング(LoRA)】約 {usedStorage_gb * LORA_MULT:.2f} GB")
|
104 |
+
result_lines.append(f"【トレーニング(フルパラメータ)】約 {usedStorage_gb * FULL_MULT:.2f} GB")
|
105 |
result_lines.append("となります。")
|
106 |
return "\n".join(result_lines)
|
107 |
|
|
|
126 |
result_lines.append(f"これらを合算するとモデルのデータサイズは約 {estimated_gb:.2f} GB です。")
|
127 |
result_lines.append("")
|
128 |
result_lines.append("推論及び、トレーニングに必要な概算のGPUメモリサイズは")
|
129 |
+
result_lines.append(f"【推論】約 {estimated_gb * INF_MULT:.2f} GB")
|
130 |
+
result_lines.append(f"【トレーニング(LoRA)】約 {estimated_gb * LORA_MULT:.2f} GB")
|
131 |
+
result_lines.append(f"【トレーニング(フルパラメータ)】約 {estimated_gb * FULL_MULT:.2f} GB")
|
132 |
result_lines.append("となります。")
|
133 |
|
134 |
# GPU選定のコメント
|