File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
test/modelDependent/llama3.1 Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,18 @@ describe("llama 3.1", () => {
24
24
for ( const token of model . iterateAllTokens ( ) ) {
25
25
const text = model . detokenize ( [ token ] ) ;
26
26
27
- if ( text . toLowerCase ( ) . includes ( "hello " ) )
28
- customBias . set ( token , - 1 ) ;
27
+ if ( text . toLowerCase ( ) . includes ( "well " ) )
28
+ customBias . set ( token , - 0.99 ) ;
29
29
else if ( text . toLowerCase ( ) . includes ( "hi" ) )
30
30
customBias . set ( token , "never" ) ;
31
- else if ( text . toLowerCase ( ) . includes ( "well" ) )
32
- customBias . set ( token , - 0.99 ) ;
33
31
}
34
32
35
- const res = await chatSession . prompt ( 'Greet me by saying "hello " to me' , {
33
+ const res = await chatSession . prompt ( 'Greet me by saying "hi " to me' , {
36
34
tokenBias : customBias ,
37
35
maxTokens : 100
38
36
} ) ;
39
37
40
- expect ( res . toLowerCase ( ) ) . to . not . include ( "hello " ) ;
38
+ expect ( res . toLowerCase ( ) ) . to . not . include ( "well " ) ;
41
39
expect ( res . toLowerCase ( ) ) . to . not . include ( "hi " ) ;
42
40
expect ( res . toLowerCase ( ) ) . to . not . include ( "hi." ) ;
43
41
} ) ;
You can’t perform that action at this time.
0 commit comments