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", () => {
2424 for ( const token of model . iterateAllTokens ( ) ) {
2525 const text = model . detokenize ( [ token ] ) ;
2626
27- if ( text . toLowerCase ( ) . includes ( "hello " ) )
28- customBias . set ( token , - 1 ) ;
27+ if ( text . toLowerCase ( ) . includes ( "well " ) )
28+ customBias . set ( token , - 0.99 ) ;
2929 else if ( text . toLowerCase ( ) . includes ( "hi" ) )
3030 customBias . set ( token , "never" ) ;
31- else if ( text . toLowerCase ( ) . includes ( "well" ) )
32- customBias . set ( token , - 0.99 ) ;
3331 }
3432
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' , {
3634 tokenBias : customBias ,
3735 maxTokens : 100
3836 } ) ;
3937
40- expect ( res . toLowerCase ( ) ) . to . not . include ( "hello " ) ;
38+ expect ( res . toLowerCase ( ) ) . to . not . include ( "well " ) ;
4139 expect ( res . toLowerCase ( ) ) . to . not . include ( "hi " ) ;
4240 expect ( res . toLowerCase ( ) ) . to . not . include ( "hi." ) ;
4341 } ) ;
You can’t perform that action at this time.
0 commit comments