Lightning-AI / Lightning-AI/litgpt

Enable multi-turn prompts for supported LLMs

Open
#1,488 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.7k
Forks
1.5k
Avg merge
15h 37m
Merged PRs (30d)
1

Description

Enable multi-turn prompts for the supported LLMs like Llama3, Mistral similar to https://github.com/Lightning-AI/litgpt/pull/1487

We should be able to do the following with other supported models:

```python
style = Llama3()
msgs = [
{"role": "system", "content": "You are a helpful AI assistant for travel tips and recommendations"},
{"role": "user", "content": "What is France's capital?"},
{"role": "assistant", "content": "Bonjour! The capital of France is Paris!"},
{"role": "user", "content": "What can I do there?"},
]
multiturn_output = style.apply(msgs)
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the related pull request 1487 and the Llama3().apply entry point shown in the issue, then compare how the other supported LLMs handle prompts. Done means the example multi-turn message sequence works for the supported models, including system, user, and assistant roles.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.