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

Question about the temperature parameter in the Hugging Face Inference API #1086

Open
xufengduan opened this issue Dec 27, 2024 · 1 comment

Comments

@xufengduan
Copy link

Hi everyone,

I have a question regarding the temperature parameter in the Hugging Face Inference API, particularly in the context of chat models. According to the documentation, the default value for temperature is 1. However, I noticed that some models seem to have a different default, such as 0.6, as specified in their generation_config.json file.

Here are my questions:

  1. When using the Inference API, if I don’t explicitly set the temperature parameter, does the API always use the model’s default value from the generation_config.json? Or does it fall back to a global default of 1 as mentioned in the docs?
  2. If I don’t pass in any additional parameters (like max_length, top_p, etc.), does the API automatically use all the defaults specified in the model’s generation_config.json file? Or are there other fallback defaults from the API side?

Thank you in advance for your help!

@coyotte508
Copy link
Member

Hi @xufengduan

This would be more a question for the backend, eg https://github.com/huggingface/text-generation-inference. The @huggingface/inference only passes the value as is, without adding anything hidden.

cc @oOraph @SBrandeis maybe if you're aware of the answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants