Skip to content

Commit 96b9143

Browse files
committed
Update masked-lm tests
1 parent 9077c21 commit 96b9143

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

tests/pipelines.test.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -248,34 +248,34 @@ describe('Pipelines', () => {
248248
let outputs = await unmasker(texts[0]);
249249
let expected = [
250250
{
251-
score: 0.9496445655822754,
251+
score: 0.9405396580696106,
252252
token: 2051,
253253
token_str: 'time',
254254
sequence: 'once upon a time.'
255255
},
256256
{
257-
score: 0.01029531005769968,
257+
score: 0.01182964164763689,
258258
token: 13342,
259259
token_str: 'mattress',
260260
sequence: 'once upon a mattress.'
261261
},
262262
{
263-
score: 0.0013969476567581296,
263+
score: 0.0017291896510869265,
264264
token: 6480,
265265
token_str: 'lifetime',
266266
sequence: 'once upon a lifetime.'
267267
},
268268
{
269-
score: 0.0008216543938033283,
269+
score: 0.0010079898638650775,
270270
token: 2504,
271271
token_str: 'level',
272272
sequence: 'once upon a level.'
273273
},
274274
{
275-
score: 0.0007674929802305996,
276-
token: 2940,
277-
token_str: 'hill',
278-
sequence: 'once upon a hill.'
275+
score: 0.0009655007743276656,
276+
token: 2154,
277+
token_str: 'day',
278+
sequence: 'once upon a day.'
279279
}
280280
];
281281
compare(outputs, expected);
@@ -289,65 +289,66 @@ describe('Pipelines', () => {
289289

290290
let expected = [[
291291
{
292-
score: 0.9918821454048157,
292+
score: 0.9900539517402649,
293293
token: 2051,
294294
token_str: 'time',
295295
sequence: 'once upon a time.'
296296
},
297297
{
298-
score: 0.0010219492251053452,
298+
score: 0.0012258145725354552,
299299
token: 13342,
300300
token_str: 'mattress',
301301
sequence: 'once upon a mattress.'
302302
},
303303
{
304-
score: 0.00024931252119131386,
304+
score: 0.0002977887343149632,
305305
token: 2096,
306306
token_str: 'while',
307307
sequence: 'once upon a while.'
308308
},
309309
{
310-
score: 0.00015193592116702348,
311-
token: 2558,
312-
token_str: 'period',
313-
sequence: 'once upon a period.'
314-
},
315-
{
316-
score: 0.00015131247346289456,
310+
score: 0.0001899998023873195,
317311
token: 6480,
318312
token_str: 'lifetime',
319313
sequence: 'once upon a lifetime.'
314+
},
315+
{
316+
score: 0.00017618606216274202,
317+
token: 2558,
318+
token_str: 'period',
319+
sequence: 'once upon a period.'
320320
}
321-
], [
321+
],
322+
[
322323
{
323-
score: 0.29160282015800476,
324+
score: 0.2863538861274719,
324325
token: 2414,
325326
token_str: 'london',
326327
sequence: 'london is the capital of england.'
327328
},
328329
{
329-
score: 0.06457117199897766,
330+
score: 0.0607745461165905,
330331
token: 2009,
331332
token_str: 'it',
332333
sequence: 'it is the capital of england.'
333334
},
334335
{
335-
score: 0.031988438218832016,
336+
score: 0.037455108016729355,
336337
token: 6484,
337338
token_str: 'birmingham',
338339
sequence: 'birmingham is the capital of england.'
339340
},
340341
{
341-
score: 0.0317111536860466,
342-
token: 7067,
343-
token_str: 'bristol',
344-
sequence: 'bristol is the capital of england.'
345-
},
346-
{
347-
score: 0.030000191181898117,
342+
score: 0.029375044628977776,
348343
token: 5087,
349344
token_str: 'manchester',
350345
sequence: 'manchester is the capital of england.'
346+
},
347+
{
348+
score: 0.0292277242988348,
349+
token: 7067,
350+
token_str: 'bristol',
351+
sequence: 'bristol is the capital of england.'
351352
}
352353
]];
353354

0 commit comments

Comments
 (0)