Yuchan commited on
Commit
67b096a
·
verified ·
1 Parent(s): 7f12cbc

Update Mo.py

Browse files
Files changed (1) hide show
  1. Mo.py +3 -2
Mo.py CHANGED
@@ -99,7 +99,8 @@ def txt_stream(file_path):
99
  )
100
 
101
 
102
- LIMIT = 36757266 // 2
 
103
 
104
  dataset = tf.data.Dataset.from_generator(
105
  lambda: txt_stream(DATA_PATH),
@@ -264,7 +265,7 @@ with strategy.scope():
264
  model.compile(optimizer=optimizer, loss=smoothed_loss_keras, metrics=[masked_perplexity])
265
 
266
  # 학습
267
- history = model.fit(dist_dataset, epochs=1, verbose=1)
268
 
269
  model.save_weights("tf_model.weights.h5")
270
  print("✅ 모델 가중치 저장 완료!")
 
99
  )
100
 
101
 
102
+ steps_per_epoch = 23119910 // batch_size
103
+ LIMIT = 23119910
104
 
105
  dataset = tf.data.Dataset.from_generator(
106
  lambda: txt_stream(DATA_PATH),
 
265
  model.compile(optimizer=optimizer, loss=smoothed_loss_keras, metrics=[masked_perplexity])
266
 
267
  # 학습
268
+ history = model.fit(dist_dataset, epochs=1, steps_per_epoch=steps_per_epoch, verbose=1)
269
 
270
  model.save_weights("tf_model.weights.h5")
271
  print("✅ 모델 가중치 저장 완료!")