File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ async function main(args: Required<CLIArguments>): Promise<void> {
83
83
. batch ( config . contextLength + 1 , 1 )
84
84
85
85
const preprocessedDataset = dataset
86
- . map ( ( tokens ) => [ tokens . pop ( ) , tokens . last ( ) ] as [ List < number > , number ] )
86
+ . map ( ( tokens ) => [ tokens . pop ( ) , tokens . last ( ) as number ] as [ List < number > , number ] )
87
87
. batch ( batchSize ) ;
88
88
89
89
// Init and train the model
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async function main(): Promise<void> {
23
23
. map ( ( text : string ) => processing . tokenize ( tokenizer , text ) )
24
24
. flatten ( )
25
25
. batch ( config . contextLength + 1 , 1 )
26
- . map ( ( tokens ) => [ tokens . pop ( ) , tokens . last ( ) ] as [ List < number > , number ] )
26
+ . map ( ( tokens ) => [ tokens . pop ( ) , tokens . last ( ) as number ] as [ List < number > , number ] )
27
27
. repeat ( )
28
28
. batch ( 8 ) ;
29
29
You can’t perform that action at this time.
0 commit comments