Shortcuts

torchtune.data.QuestionAnswerTemplate

torchtune.data.QuestionAnswerTemplate = functools.partial(<class 'torchtune.data._prompt_templates.PromptTemplate'>, template={'user': ('Question: ', '\n\nAnswer: ')})

A prompt template for question answering tasks:

Question: {user_message}

Answer: {assistant_message}

Please see PromptTemplate for full API arguments.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources