apache / kyuubi

Apache Kyuubi is a distributed and multi-tenant gateway to provide serverless SQL on data warehouses and lakehouses.
https://kyuubi.apache.org/
Apache License 2.0
2.06k stars 904 forks source link

[TASK][CHALLENGE] Offline GPT backend for Chat engine #4555

Open pan3793 opened 1 year ago

pan3793 commented 1 year ago

Code of Conduct

Search before asking

Describe the subtask

Currently, the Kyuubi supports Chat engine by invoking the ChatGPT online open API

Client => Kyuubi Server => Kyuubi Chat engine (invoke ChatGPT REST API)

But, is there any chance we can add a built-in offline ChatGPT engine? The answer is YES.

Client => Kyuubi Server => Kyuubi Chat engine (do prediction using local GPT model)

There is a project https://github.com/karpathy/nanoGPT which can train the GPT-2 model.

... currently the file train.py reproduces GPT-2 (124M) on OpenWebText, running on a single 8XA100 40GB node in about 4 days of training.

So, the basic idea is, training a GPT-like model, and Kyuubi Chat engine invoking this model to answer the question.

There are some specific questions:

Also, there is another interesting project https://github.com/ggerganov/llama.cpp

Parent issue

https://github.com/apache/kyuubi/issues/4549

Are you willing to submit PR?

rose2221 commented 10 months ago

can i work on this issue? PLease assign me

pan3793 commented 10 months ago

@rose2221 thanks for your passion, may I ask do you have an estimation of when to complete the task? Since this is a challenging task, I would like to see some design and implementation steps before the task assignment.

Additional Context about 2023 Kyuubi Code Contribution Program

zhaohehuhu commented 9 months ago

@rose2221 Hey buddy, I'm interested in this task as well. Can we do it together?