Skip to content

Which undocumented transformersJS Generator parameters are supported? crapCheck ran fine. #1186

Open
@hpssjellis

Description

@hpssjellis

Question

Sorry to bug you again Josh @xenova I was trying a set of generator parameters and things were working fine without errors so I tried the parameter "crapCheck" and it also ran without errors so now I am worried if anything works. In the docs it seems that these are supported:

Supported Parameters (Confirmed in Docs)

max_new_tokens: ✅ Yes (Controls the number of new tokens to generate)

do_sample: ✅ Yes (Enables sampling)

top_p: ✅ Yes (Nucleus sampling)

temperature: ✅ Yes (Controls randomness)

top_k: ✅ Yes (Top-k filtering)

num_return_sequences: ✅ Yes (Number of sequences to return)

Demo code here but without all the below parameters, just some of them.

Any suggestions on what may work and what to ignore?


    const output = await generator(messages, {


      max_new_tokens: myMaxT,          // 512
      do_sample: myDo_sample,          // true
      top_p: myTop_p,                          // 0.9  
      temperature: myTemperature,    // 0.7
      top_k: myTop_k,                          // testing if it does top_k  50
      num_return_sequences: 1,          // 1
      streamer,                                     // calls the function TextStreamer

      min_length: myMin_length,                          // Ensures at least 20 tokens are generated
      repetition_penalty: myRepetition_penalty,   // 1.2
      length_penalty: myLength_penalty,             // 1.5

      early_stopping: myEarly_stopping,               // end testing  true false
      chain_of_thought: myChain_of_thought,      // true
      stopping_criteria: stoppingCriteria,              // Use stopping criteria for clean stopping

      crapCheck: 65,                                             // fairly sure this is not supported

    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions