sarahciston commited on
Commit
8b4c4dc
1 Parent(s): 40be2d7

try with repetition penalty and [mask]

Browse files
Files changed (1) hide show
  1. sketch.js +4 -4
sketch.js CHANGED
@@ -17,8 +17,8 @@ async function textGenTask(pre, prompt){
17
  console.log('text-gen task initiated')
18
 
19
  // preprompt not working, fix later
20
- // let INPUT = pre + prompt
21
- let INPUT = prompt
22
 
23
  // PICK MODEL
24
  let MODEL = 'Xenova/LaMini-Cerebras-256M'
@@ -27,9 +27,9 @@ async function textGenTask(pre, prompt){
27
  const pipe = await pipeline('text-generation', MODEL)
28
 
29
  // RUN INPUT THROUGH MODEL,
30
- var out = await pipe(INPUT, { max_new_tokens: 60, top_k: 90 })
31
  // setting hyperparameters
32
- // max_new_tokens: 256, top_k: 50, temperature: 0.7, do_sample: true,
33
 
34
  console.log(await out)
35
  console.log('text-gen task completed')
 
17
  console.log('text-gen task initiated')
18
 
19
  // preprompt not working, fix later
20
+ let INPUT = pre + prompt
21
+ // let INPUT = prompt
22
 
23
  // PICK MODEL
24
  let MODEL = 'Xenova/LaMini-Cerebras-256M'
 
27
  const pipe = await pipeline('text-generation', MODEL)
28
 
29
  // RUN INPUT THROUGH MODEL,
30
+ var out = await pipe(INPUT, { max_new_tokens: 60, top_k: 90, repetition_penalty: 1.5 })
31
  // setting hyperparameters
32
+ // max_new_tokens: 256, top_k: 50, temperature: 0.7, do_sample: true, no_repeat_ngram_size: 2,
33
 
34
  console.log(await out)
35
  console.log('text-gen task completed')