Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Add more details about prompt format in the docs #126

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

alanwguo
Copy link
Contributor

Trying to make it easier for users to self-service add custom models to use with ray-llm.

models/README.md Outdated
@@ -69,6 +69,24 @@ RayLLM supports continuous batching, meaning incoming requests are processed as
You can follow the TensorRT-LLM example to generate the model.(https://github.com/NVIDIA/TensorRT-LLM/tree/v0.6.1/examples/llama). After generating the model, you can upload the model artifact to S3 and use the `s3_mirror_config` to load the model from S3. You can also place the model artifacts in a local directory and use the `model_local_path` to load the model from the local directory. See the [llama example](continuous_batching/trtllm-meta-llama--Llama-2-7b-chat-hf.yaml) for more details.


#### Prompt Format
A prompt format is used to convert a chat completions API input into a prompt to feed into the LLM engine. The format is a dictionary where the key refers to one of the chat actors and the value is a string template for which to convert the text of the actor into a string to add to the overall prompt. The template is used to generate a portion of the prompt and each portion is assembled together to form the final prompt.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if this prompt_format is only used in the ChatCompletions API.

I assume it is

Signed-off-by: Alan Guo <[email protected]>
Copy link
Contributor

@tchordia tchordia left a comment

Choose a reason for hiding this comment

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

lgtm! I think it would be helpful to add examples. Let's add example prompts formats and the final formatted string?

@alanwguo
Copy link
Contributor Author

There's an existing example in the docs below. I'll add a reference to it.

Signed-off-by: Alan Guo <[email protected]>
@alanwguo alanwguo merged commit f6926b7 into master Jan 25, 2024
2 checks passed
@alanwguo alanwguo deleted the improve-prompt-format-docs branch January 25, 2024 22:05
alanwguo pushed a commit that referenced this pull request Jan 25, 2024
alanwguo added a commit that referenced this pull request Jan 25, 2024
Trying to make it easier for users to self-service add custom models to
use with ray-llm.

---------

Signed-off-by: Alan Guo <[email protected]>
alanwguo added a commit that referenced this pull request Jan 26, 2024
Trying to make it easier for users to self-service add custom models to
use with ray-llm.

Cherry-pick of #126

---------

Signed-off-by: Alan Guo <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants