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

Update Llama2 multi-processes example #11852

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

sgwhat
Copy link
Contributor

@sgwhat sgwhat commented Aug 19, 2024

Description

Modify the prompt handling section in the llama2 example for #11787.

1. Why the change?

Support users in providing their own prompts to improve response quality.

2. User API changes

N/A

3. Summary of the change

4. How to test?

  • MTL
  • LNL

@sgwhat sgwhat requested a review from plusbang August 19, 2024 10:27
import random
idx = random.randint(0, 2)
prompt = prompts[idx]
prompt = get_prompt(args.prompt, [], system_prompt=DEFAULT_SYSTEM_PROMPT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also need to update sample output in readme. Other LGTM.

- `--n-predict N_PREDICT`: argument defining the max number of tokens to predict. It is default to be `32`.
- `--max-output-len MAX_OUTPUT_LEN`: Defines the maximum sequence length for both input and output tokens. It is default to be `1024`.
- `--max-prompt-len MAX_PROMPT_LEN`: Defines the maximum number of tokens that the input prompt can contain. It is default to be `128`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 128? Maybe 512 or 768

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to 768.

@sgwhat sgwhat merged commit 7380823 into intel-analytics:main Aug 19, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants