Skip to content

Commit

Permalink
Fix wikitext task id
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienVig committed Jul 1, 2024
1 parent 9ac364d commit 7095845
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cli/src/benchmark_gpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function main(args: Required<CLIArguments>): Promise<void> {

// Fetch the wikitext task from the server
const tasks = await fetchTasks(url)
const task = tasks.get('wikitext-103')
const task = tasks.get('llm_task')
if (task === undefined) { throw new Error('task not found') }

/**
Expand Down Expand Up @@ -84,6 +84,7 @@ async function main(args: Required<CLIArguments>): Promise<void> {
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
2 changes: 1 addition & 1 deletion docs/examples/wikitext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function main(): Promise<void> {

// Fetch the wikitext task from the server
const tasks = await fetchTasks(url)
const task = tasks.get('wikitext-103')
const task = tasks.get('llm_task')
if (task === undefined) { throw new Error('task not found') }

let model;
Expand Down

0 comments on commit 7095845

Please sign in to comment.