Skip to content

Commit

Permalink
training config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsanbear committed Mar 14, 2024
1 parent 349ea49 commit b0cea9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ impl Config {
// Default configuration for initial evaluation, will add larger configs later after confirming valid output
pub fn default() -> Self {
Self {
dim: 256,
dim: 512,
depth: 8,
vocab_size: 32000,
heads: 8,
ff_mult: 12,
ff_mult: 10,
eps: 1e-6,
ff_dropout: 0.1,
seq_len: 100,
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct TrainingCmd {
dataset: String,

/// The batch size to use
#[arg(long, default_value = "2")]
#[arg(long, default_value = "1")]
batch_size: usize,

/// The learning rate to use
Expand Down
2 changes: 1 addition & 1 deletion src/training.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn run(args: &TrainingCmd, common_args: &Args) -> Result<()> {
let _enter = span.enter();
opt.backward_step(&loss)?;
}
if batch_index > 0 && batch_index % 10 == 0 {
if batch_index > 0 && batch_index % 100 == 0 {
let training_loss = f64::from(loss.to_vec0::<f32>()?);
let validation_loss =
valid_loss(args.seq_len, args.batch_size, &dataset, &mut model, &device)?;
Expand Down

0 comments on commit b0cea9c

Please sign in to comment.