Skip to content

Commit c6beac9

Browse files
committed
discojs/src/default_tasks/wikitext: use task's maxSequenceLength in the model init config
1 parent a596ead commit c6beac9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

discojs/src/default_tasks/wikitext.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export const wikitext: TaskProvider<'text'> = {
4141
}
4242
},
4343

44-
getModel (): Promise<Model<'text'>> {
45-
return Promise.resolve(new models.GPT())
44+
getModel(): Promise<Model<'text'>> {
45+
return Promise.resolve(new models.GPT({
46+
blockSize: this.getTask().trainingInformation.maxSequenceLength,
47+
}))
4648
}
4749
}

webapp/src/components/testing/__tests__/Testing.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const TASK: Task<"text"> = {
2828
batchSize: 1,
2929
roundDuration: 1,
3030
validationSplit: 0,
31+
maxSequenceLength: 64,
3132
},
3233
};
3334

0 commit comments

Comments
 (0)