#using seed param

1 messages · Page 1 of 1 (latest)

indigo edge
#

any tips on using the new seed parameter?

tardy cragBOT
#

Hi @indigo edge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Yes, the seed parameter is a feature that allows you to achieve mostly deterministic outputs across API calls. Here are some tips on how to use it:

  • Set the seed parameter to any integer of your choice, but use the same value across requests. For example, 12345.
  • Set all other parameters (like prompt, temperature, top_p, etc.) to the same values across requests.
  • In the response, check the system_fingerprint field. The system fingerprint is an identifier for the current combination of model weights, infrastructure, and other configuration options used by OpenAI servers to generate the completion. It changes whenever you change request parameters, or OpenAI updates numerical configuration of the infrastructure serving our models (which may happen a few times a year).
  • If the seed, request parameters, and system_fingerprint all match across your requests, then model outputs will mostly be identical. There is a small chance that responses differ even when request parameters and system_fingerprint match, due to the inherent non-determinism of our models.

Please note that while the seed parameter is designed to provide deterministic outputs, it's not guaranteed due to the inherent non-determinism of computers and changes in the backend. Always refer to the system_fingerprint response parameter to monitor changes in the backend.

For more information, you can refer to the OpenAI Cookbook (https://github.com/openai/openai-cookbook/blob/main/examples/Deterministic_outputs_with_the_seed_parameter.ipynb) and the OpenAI Platform Documentation (https://platform.openai.com/docs/guides/text-generation).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: