Views
No views yet
pip install lmdeploy[all]1from lmdeploy import pipeline, TurbomindEngineConfig
2engine_config = TurbomindEngineConfig(model_format='awq')
3pipe = pipeline("internlm/internlm2-chat-7b-4bits", backend_config=engine_config)
4response = pipe(["Hi, pls intro yourself", "Shanghai is"])
5print(response)api_server enables models to be easily packed into services with a single command. The provided RESTful APIs are compatible with OpenAI's interfaces. Below are an example of service startup:lmdeploy serve api_server internlm/internlm2-chat-7b-4bits --backend turbomind --model-format awqapi_server is 23333. After the server is launched, you can communicate with server on terminal through api_client:lmdeploy serve api_client http://0.0.0.0:23333api_server APIs online by swagger UI at http://0.0.0.0:23333, or you can also read the API specification from here.