Compare commits
No commits in common. "bb65dec449d4cfc983d7a61b8d3aba56e6464a46" and "dc8290fddf1de7b643e8f5200f7bf825b3add368" have entirely different histories.
bb65dec449
...
dc8290fddf
20
example.py
20
example.py
|
@ -8,15 +8,19 @@ model = AIIAmoe(config)
|
||||||
model.save_pretrained("test")
|
model.save_pretrained("test")
|
||||||
model = AIIAmoe.from_pretrained("test")
|
model = AIIAmoe.from_pretrained("test")
|
||||||
|
|
||||||
|
# Initialize pretrainer with the model
|
||||||
pretrainer = Pretrainer(model, learning_rate=1e-4, config=config)
|
pretrainer = Pretrainer(model, learning_rate=1e-4, config=config)
|
||||||
|
|
||||||
# Set checkpoint directory
|
# List of dataset paths
|
||||||
checkpoint_dir = "checkpoints/my_model"
|
dataset_paths = [
|
||||||
|
"/path/to/dataset1.parquet",
|
||||||
|
"/path/to/dataset2.parquet"
|
||||||
|
]
|
||||||
|
|
||||||
# Start training (will automatically load checkpoint if available)
|
# Start training with multiple datasets
|
||||||
pretrainer.train(
|
pretrainer.train(
|
||||||
dataset_paths=["path/to/dataset1.parquet", "path/to/dataset2.parquet"],
|
dataset_paths=dataset_paths,
|
||||||
output_path="trained_models/my_model",
|
num_epochs=10,
|
||||||
checkpoint_dir=checkpoint_dir,
|
batch_size=2,
|
||||||
num_epochs=10
|
sample_size=10000
|
||||||
)
|
)
|
Loading…
Reference in New Issue