admincybers2 commited on
Commit
ecb4489
·
verified ·
1 Parent(s): 35f8fd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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 = "unsloth/Meta-Llama-3.1-70B-bnb-4bit"
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=1,
116
- gradient_accumulation_steps=1,
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
- uploads_models = f"cybersentinal-2.0-{str(num)}"
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")