authorized list problem

#4
by WANNTING - opened

image.png
Not sure why, I want to download the model and use it but keep encountering this problem.
If anyone has any workaround suggestions please provide them to me. Thanks a lot

Hi @WANNTING , When you open any Gemma model card in HuggingFace, you'll be prompted to acknowledge the license. By clicking on it, you provide your consent and agree to the terms and conditions of Gemma.

Steps to Create a New Access Token with Read Permissions:

  1. Navigate to Your Profile:
    Click on your profile icon located at the top right corner of the screen.

  2. Access Settings:
    From the dropdown menu, select Settings to open your account settings page.

  3. Go to Access Tokens:
    In the settings menu, find and click on Access Tokens. This section allows you to manage your personal access tokens.

  4. Create a New Token:
    Click on the Create New Token button to generate a new access token.

  5. Set Permissions:
    In the permissions section, ensure that Repositories permissions are configured with Read access. This is important for accessing the repositories you need.

  6. Generate Token:
    Once you’ve configured the necessary permissions, click on Generate Token. Make sure to copy the token and store it securely, as it will only be displayed once.
    After that, follow the lines of code below in your notebook:

from huggingface_hub import login
login(access_token)

Could you please refer this gist file for reference. If your still facing an issue, please let us know.

Thank you.

Thank you for your help. I have successfully loaded the model and performed inference. However, it seems that the model always generates very short responses, even when I set the parameter max_new_tokens=2000. Could there be any mistakes in how I am using it? Thank you.

Here is my code, but the model only responded with 'year' in the end.
image.png

Google org

@WANNTING , There might be many reasons for this issue:

  1. Try with different prompts which means model response length can depend heavily on the input prompt. If the prompt does not encourage
    or necessitate long responses, the model might generate a shorter answer. You can test this by modifying the prompt to explicitly request
    detailed and long answers.

Example prompt: "The certificate appears in the attached image. Please answer the following question in full sentences with 100 words: What is the validity period of this certificate?"

  1. Parameters {temperature, top_p, and top_k}, can influence the output length.
    Low temperature values may result in shorter, more conservative responses.
    High top_p or top_k values might restrict variability and truncation in the output.
    So, try with difference values of them.

  2. Use skip_special_tokens=True in decoding helps to avoid this issue.

Thank you.

I got it,thanks a lot

Sign up or log in to comment