forked from huggingface/tgi-gaudi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: accept list as prompt and use first string (huggingface#1702)
This PR allows the `CompletionRequest.prompt` to be sent as a string or array of strings. When an array is sent the first value will be used if it's a string; otherwise the according error will be thrown Fixes: huggingface#1690 Similar to: https://github.com/vllm-project/vllm/pull/323/files
- Loading branch information
Showing
11 changed files
with
1,188 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...odels/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"choices": [ | ||
{ | ||
"finish_reason": "eos_token", | ||
"index": 1, | ||
"logprobs": null, | ||
"text": " PR for more information?" | ||
}, | ||
{ | ||
"finish_reason": "length", | ||
"index": 0, | ||
"logprobs": null, | ||
"text": "le Business Incubator is providing a workspace" | ||
}, | ||
{ | ||
"finish_reason": "length", | ||
"index": 2, | ||
"logprobs": null, | ||
"text": " severely flawed and often has a substandard" | ||
}, | ||
{ | ||
"finish_reason": "length", | ||
"index": 3, | ||
"logprobs": null, | ||
"text": "hd20220811-" | ||
} | ||
], | ||
"created": 1713284455, | ||
"id": "", | ||
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", | ||
"object": "text_completion", | ||
"system_fingerprint": "2.0.0-native", | ||
"usage": { | ||
"completion_tokens": 36, | ||
"prompt_tokens": 8, | ||
"total_tokens": 44 | ||
} | ||
} |
Oops, something went wrong.