sarahciston commited on
Commit
304ffe0
1 Parent(s): 52a9b85

try basic model distilgpt2

Browse files
Files changed (1) hide show
  1. sketch.js +4 -3
sketch.js CHANGED
@@ -18,7 +18,7 @@ async function textGenTask(pre, prompt){
18
  let INPUT = pre + prompt
19
 
20
  // PICK MODEL
21
- let MODEL = 'Xenova/bloomz-560m'
22
  // const = modelsList = ['Xenova/LaMini-Cerebras-256M', 'Xenova/TinyLlama-1.1B-Chat-v1.0']
23
 
24
  const pipe = await pipeline('text-generation', MODEL)
@@ -26,11 +26,12 @@ async function textGenTask(pre, prompt){
26
  // RUN INPUT THROUGH MODEL, setting hyperparameters
27
  var out = await pipe(INPUT, {
28
  max_new_tokens: 256,
29
- temperature: 0.7,
30
- do_sample: true,
31
  top_k: 50,
32
  })
33
 
 
 
 
34
  console.log(await out)
35
  console.log('text-gen task completed')
36
 
 
18
  let INPUT = pre + prompt
19
 
20
  // PICK MODEL
21
+ let MODEL = 'Xenova/distilgpt2'
22
  // const = modelsList = ['Xenova/LaMini-Cerebras-256M', 'Xenova/TinyLlama-1.1B-Chat-v1.0']
23
 
24
  const pipe = await pipeline('text-generation', MODEL)
 
26
  // RUN INPUT THROUGH MODEL, setting hyperparameters
27
  var out = await pipe(INPUT, {
28
  max_new_tokens: 256,
 
 
29
  top_k: 50,
30
  })
31
 
32
+ // temperature: 0.7,
33
+ // do_sample: true,
34
+
35
  console.log(await out)
36
  console.log('text-gen task completed')
37