Eric Gardner commited on
Commit
8067185
·
1 Parent(s): be647a4

Use LaMini-Flan-T5-248M (distilled model)

Browse files
Files changed (1) hide show
  1. services/questionGenerator.js +3 -3
services/questionGenerator.js CHANGED
@@ -3,12 +3,12 @@ import { pipeline } from '@xenova/transformers';
3
  let generator = null;
4
 
5
  /**
6
- * Initialize the question generation model (Flan-T5-base)
7
  */
8
  export async function initQuestionGenerator() {
9
  if ( !generator ) {
10
- console.log( 'Loading question generation model (flan-t5-base)...' );
11
- generator = await pipeline( 'text2text-generation', 'Xenova/flan-t5-base' );
12
  console.log( 'Question generation model loaded.' );
13
  }
14
  return generator;
 
3
  let generator = null;
4
 
5
  /**
6
+ * Initialize the question generation model (LaMini-Flan-T5-248M)
7
  */
8
  export async function initQuestionGenerator() {
9
  if ( !generator ) {
10
+ console.log( 'Loading question generation model (LaMini-Flan-T5-248M)...' );
11
+ generator = await pipeline( 'text2text-generation', 'Xenova/LaMini-Flan-T5-248M' );
12
  console.log( 'Question generation model loaded.' );
13
  }
14
  return generator;