Spaces:
Runtime error
Runtime error
John Doe
commited on
Commit
·
61938d3
1
Parent(s):
0be3887
low_cpu_mem_usageを削除
Browse filesZmaker.pyの引数の一つのlow_cpu_mem_usageを削除。
十分メモリがある環境なので必要ないと判断
Zmaker.py
CHANGED
|
@@ -11,9 +11,9 @@ class Zmaker:
|
|
| 11 |
min_len, max_len = 1, 128
|
| 12 |
|
| 13 |
#予測時のパラメータ
|
| 14 |
-
top_k, top_p =
|
| 15 |
num_text = 1 #出力する文の数
|
| 16 |
-
temp = 1
|
| 17 |
repeat_ngram_size = 1
|
| 18 |
|
| 19 |
#推論にCPU利用を強制するか
|
|
@@ -64,9 +64,7 @@ class Zmaker:
|
|
| 64 |
#モデルの読み込み
|
| 65 |
if ft_path is not None:
|
| 66 |
self.model = AutoModelForCausalLM.from_pretrained(
|
| 67 |
-
ft_path,
|
| 68 |
-
#torch_dtype = torch.bfloat16,
|
| 69 |
-
low_cpu_mem_usage = True
|
| 70 |
)
|
| 71 |
else:
|
| 72 |
print("fine-tuned model was not found")
|
|
|
|
| 11 |
min_len, max_len = 1, 128
|
| 12 |
|
| 13 |
#予測時のパラメータ
|
| 14 |
+
top_k, top_p = 40, 0.95 #top-k検索の閾値
|
| 15 |
num_text = 1 #出力する文の数
|
| 16 |
+
temp = 0.1
|
| 17 |
repeat_ngram_size = 1
|
| 18 |
|
| 19 |
#推論にCPU利用を強制するか
|
|
|
|
| 64 |
#モデルの読み込み
|
| 65 |
if ft_path is not None:
|
| 66 |
self.model = AutoModelForCausalLM.from_pretrained(
|
| 67 |
+
ft_path, #torch_dtype = torch.bfloat16
|
|
|
|
|
|
|
| 68 |
)
|
| 69 |
else:
|
| 70 |
print("fine-tuned model was not found")
|