MyGit

v0.5.6

bentoml/OpenLLM

版本发布时间: 2024-06-11 23:36:20

bentoml/OpenLLM最新发布版本:v0.6.13(2024-10-17 21:17:35)

OpenLLM has undergone a significant upgrade in its v0.5 release to enhance compatibility with the BentoML 1.2 SDK. The CLI has also been streamlined to focus on delivering the most easy-to-use and reliable experience for deploying open-source LLMs to production. However, version 0.5 introduces breaking changes.

Breaking changes, and the reason why.

After releasing version 0.4, we realized that while OpenLLM offers a high degree of flexibility and power to users, they encountered numerous issues when attempting to deploy these models. OpenLLM had been trying to accomplish a lot by providing support for different backends (mainly PyTorch for CPU inference and vLLM for GPU inference) and accelerators. Although this provided users with the option to quickly test on their local machines, we discovered that this brought a lot of confusion when running OpenLLM locally versus the cloud. The difference between local and cloud deployment made it difficult for users to understand and control the packaged Bento to behave correctly on the cloud.

The motivation for 0.5 is to focus on cloud deployment. Cloud deployments often focus on high throughput and high concurrency serving, and GPU is the most common choice of hardware for achieving high throughput and concurrency serving. Therefore, we simplified backend support to just vLLM which is the most suitable and reliable for serving LLM on GPU on the cloud.

Architecture changes and SDK.

For version 0.5, we have decided to reduce the scope and support the backend that yields the most performance (in this case, vLLM). This means that pip install openllm will also depend on vLLM. In other words, we will currently pause our support for CPU going forward. All interactions with OpenLLM servers going forward should be done through clients (i.e., BentoML's Clients, OpenAI, etc.).

CLI

CLI has now been simplified to openllm start and openllm build

HuggingFace models

openllm start

openllm start will continue to accept HuggingFace model id for supported model architectures:

openllm start microsoft/Phi-3-mini-4k-instruct --trust-remote-code

For any models that requires remote code execution, one should pass in --trust-remote-code

openllm start will also accept serving from local path directly. Make sure to also pass in --trust-remote-code if you wish to use with openllm start

openllm start path/to/custom-phi-instruct --trust-remote-code

openllm build

In previous versions, OpenLLM would copy the local cache of the models into the generated Bento store, resulting in having two copies of the models on users’ machine. From v0.5 going forward, models won't be packaged with the Bento and will be downloaded into Hugging Face cache first time on deployment.

openllm build microsoft/Phi-3-mini-4k-instruct --trust-remote-code

Successfully built Bento 'microsoft--phi-3-mini-4k-instruct-service:5fa34190089f0ee40f9cce3cafc396b89b2e5e83'.

 ██████╗ ██████╗ ███████╗███╗   ██╗██╗     ██╗     ███╗   ███╗
██╔═══██╗██╔══██╗██╔════╝████╗  ██║██║     ██║     ████╗ ████║
██║   ██║██████╔╝█████╗  ██╔██╗ ██║██║     ██║     ██╔████╔██║
██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║██║     ██║     ██║╚██╔╝██║
╚██████╔╝██║     ███████╗██║ ╚████║███████╗███████╗██║ ╚═╝ ██║
 ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝╚══════╝╚══════╝╚═╝     ╚═╝.

📖 Next steps:
☁️  Deploy to BentoCloud:
  $ bentoml deploy microsoft--phi-3-mini-4k-instruct-service:5fa34190089f0ee40f9cce3cafc396b89b2e5e83 -n ${DEPLOYMENT_NAME}
☁️  Update existing deployment on BentoCloud:
  $ bentoml deployment update --bento microsoft--phi-3-mini-4k-instruct-service:5fa34190089f0ee40f9cce3cafc396b89b2e5e83 ${DEPLOYMENT_NAME}
🐳 Containerize BentoLLM:
  $ bentoml containerize microsoft--phi-3-mini-4k-instruct-service:5fa34190089f0ee40f9cce3cafc396b89b2e5e83 --opt progress=plain

For quantized models, make sure to also pass in the --quantize flag during build

openllm build casperhansen/llama-3-70b-instruct-awq --quantize awq

See openllm build --help for more information

Private models

openllm start

For private models, we recommend users to save it to [BentoML’s Model store](https://docs.bentoml.com/en/latest/guides/model-store.html#model-store) first before using openllm start:

with bentoml.models.create(name="my-private-models") as model:
	PrivateTrainedModel.save_pretrained(model.path)
	MyTokenizer.save_pretrained(model.path)

Note: Make sure to also save your tokenizer in this bentomodel

You can then pass in the private model name directly to openllm start

openllm start my-private-models

openllm build

Similar to openllm start, openllm build will only accept private models from BentoML’s model store:

openllm build my-private-models

What's next?

Currently, OpenAI's compatibility will only have the /chat/completions and /models endpoints supported. We will continue bringing /completions as well as function calling support soon, so stay tuned.

Thank you for your continued support and trust in us. We would love to hear more of your feedback on the releases.

相关地址:原始地址 下载(tar) 下载(zip)

1、 openllm-0.5.6-aarch64-apple-darwin.tar.gz 1.78MB

2、 openllm-0.5.6-aarch64-unknown-linux-gnu.tar.gz 1.84MB

3、 openllm-0.5.6-i686-unknown-linux-gnu.tar.gz 1.9MB

4、 openllm-0.5.6-powerpc64le-unknown-linux-gnu.tar.gz 1.99MB

5、 openllm-0.5.6-py3-none-any.whl 75.3KB

6、 openllm-0.5.6-x86_64-apple-darwin.tar.gz 1.89MB

7、 openllm-0.5.6-x86_64-unknown-linux-gnu.tar.gz 2.04MB

8、 openllm-0.5.6-x86_64-unknown-linux-musl.tar.gz 2.09MB

9、 openllm-0.5.6.tar.gz 76.48KB

10、 openllm_client-0.5.6-py3-none-any.whl 17.07KB

11、 openllm_client-0.5.6.tar.gz 19.07KB

12、 openllm_core-0.5.6-py3-none-any.whl 69.43KB

13、 openllm_core-0.5.6.tar.gz 51.32KB

查看:2024-06-11发行的版本