Spaces:
Paused
Paused
admincybers2
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ current_num = os.getenv("NUM")
|
|
17 |
print(f"stage ${current_num}")
|
18 |
|
19 |
api = HfApi(token=hf_token)
|
20 |
-
models = "
|
21 |
|
22 |
print("Starting model and tokenizer loading...")
|
23 |
|
@@ -112,13 +112,14 @@ trainer = SFTTrainer(
|
|
112 |
dataset_num_proc=2,
|
113 |
packing=False,
|
114 |
args=TrainingArguments(
|
115 |
-
per_device_train_batch_size=
|
116 |
-
gradient_accumulation_steps=
|
117 |
learning_rate=2e-4,
|
118 |
fp16=not is_bfloat16_supported(),
|
119 |
bf16=is_bfloat16_supported(),
|
120 |
warmup_steps=5,
|
121 |
logging_steps=10,
|
|
|
122 |
optim="adamw_8bit",
|
123 |
weight_decay=0.01,
|
124 |
lr_scheduler_type="linear",
|
@@ -135,9 +136,7 @@ print("Training completed.")
|
|
135 |
num = int(current_num)
|
136 |
num += 1
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
up = "sentinal-3.1-70B"
|
141 |
|
142 |
print("Saving the trained model...")
|
143 |
model.save_pretrained_merged("model", tokenizer, save_method="merged_16bit")
|
|
|
17 |
print(f"stage ${current_num}")
|
18 |
|
19 |
api = HfApi(token=hf_token)
|
20 |
+
models = "dad1909/cybersentinal-2.0"
|
21 |
|
22 |
print("Starting model and tokenizer loading...")
|
23 |
|
|
|
112 |
dataset_num_proc=2,
|
113 |
packing=False,
|
114 |
args=TrainingArguments(
|
115 |
+
per_device_train_batch_size=5,
|
116 |
+
gradient_accumulation_steps=5,
|
117 |
learning_rate=2e-4,
|
118 |
fp16=not is_bfloat16_supported(),
|
119 |
bf16=is_bfloat16_supported(),
|
120 |
warmup_steps=5,
|
121 |
logging_steps=10,
|
122 |
+
max_steps=200,
|
123 |
optim="adamw_8bit",
|
124 |
weight_decay=0.01,
|
125 |
lr_scheduler_type="linear",
|
|
|
136 |
num = int(current_num)
|
137 |
num += 1
|
138 |
|
139 |
+
up = "sentinal-2"
|
|
|
|
|
140 |
|
141 |
print("Saving the trained model...")
|
142 |
model.save_pretrained_merged("model", tokenizer, save_method="merged_16bit")
|