Skip to content

Commit

Permalink
Remove print
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienVig committed Jul 1, 2024
1 parent 7095845 commit a4cd86f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cli/src/benchmark_gpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ async function main(args: Required<CLIArguments>): Promise<void> {
console.log(`\tmodel type ${modelType} \n\tbatch size ${batchSize} \n\tcontext length ${contextLength}`)

let epochTime = performance.now()
for (let epochsCounter = 0; epochsCounter < epochsCount; epochsCounter++) {
for (let epochsCounter = 1; epochsCounter <= epochsCount; epochsCounter++) {
const [_, logs] = await async_iterator.gather(model.train(preprocessedDataset))
epochTime = (performance.now() - epochTime)
const msPerToken = epochTime / (batchSize * contextLength * iterationsPerEpoch * epochsCounter)
console.log(epochTime, batchSize, contextLength ,iterationsPerEpoch ,epochsCounter)
console.log(`\t\tTraining time: ${msPerToken.toFixed(2)} ms/token <br> ${logs.peakMemory.toFixed(2)} GB`)
}

Expand Down

0 comments on commit a4cd86f

Please sign in to comment.