Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hpssjellis opened this issue Feb 9, 2025 · 0 comments
Labels
question Further information is requested

Comments

@hpssjellis
Copy link

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

    });
@hpssjellis hpssjellis added the question Further information is requested label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant