Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Aug 31, 2023

Thanks to @dsikka for noticing the current outputs of the server were garbage - the pipeline was returning only the tokens delta during streaming rather than the ongoing concatenated text.

Also implement full support for non-streaming.

Start the server with:

python examples/openai-server/server.py --model zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none

And hit it with a prompt request:

curl http://localhost:8000/v1/completions \                                                                                                                                  
    -H "Content-Type: application/json" \
    -d '{
        "model": "zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none",
        "prompt": "def fib():",
        "max_tokens": 30
    }'  
    
{"id":"cmpl-90fc6217001d4556973b2b82ebc44270","object":"text_completion","created":1693451970,"model":"zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none","choices":[{"index":0,"text":"\n    a, b = 0, 1\n    while True:\n        yield a\n        a, b = b, a + b","logprobs":null,"finish_reason":"stop"}]}

@mgoin mgoin marked this pull request as ready for review August 31, 2023 03:21
@mgoin mgoin requested review from bfineran and dsikka August 31, 2023 03:22
@InquestGeronimo InquestGeronimo self-requested a review August 31, 2023 17:43
@mgoin mgoin merged commit 46ea1db into main Aug 31, 2023
@mgoin mgoin deleted the openai-server-full-text branch August 31, 2023 18:41
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