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

Fix prompt formatting features #67

Open
dagrayvid opened this issue Oct 31, 2024 · 0 comments
Open

Fix prompt formatting features #67

dagrayvid opened this issue Oct 31, 2024 · 0 comments

Comments

@dagrayvid
Copy link
Collaborator

The dataset.py get_format_string(...) function is outdated and should be removed.

llm-load-test/dataset.py

Lines 122 to 137 in 955c120

def get_format_string(model_name):
"""Get the format string."""
known_system_prompts = {
"llama": "<s>[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n{prompt} [/INST]",
"flan": "Question: {prompt}\n\nAnswer:",
"gpt-neox": "{system_prompt}\n\n{prompt}",
"starcoder": "input: \n\n{prompt} \n\noutput:",
}
for name, fmt_str in known_system_prompts.items():
if name in model_name:
logging.info("Using %s prompt format, model_name: %s", name, model_name)
return fmt_str
logging.info("Using default prompt format model_name: %s", model_name)
return "{system_prompt}\n\n{prompt}"

By default no prompt formatting should be done. We could have a config.yaml field for a similar template that accepts {system_prompt} and {prompt} as variables.

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

1 participant