Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -567,7 +567,7 @@ To deploy InternVL2 as an API, please configure the chat template config first.
|
|
567 |
LMDeploy's `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:
|
568 |
|
569 |
```shell
|
570 |
-
lmdeploy serve api_server OpenGVLab/InternVL2-26B --
|
571 |
```
|
572 |
|
573 |
To use the OpenAI-style interface, you need to install OpenAI:
|
@@ -584,7 +584,7 @@ from openai import OpenAI
|
|
584 |
client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')
|
585 |
model_name = client.models.list().data[0].id
|
586 |
response = client.chat.completions.create(
|
587 |
-
model=
|
588 |
messages=[{
|
589 |
'role':
|
590 |
'user',
|
@@ -614,7 +614,7 @@ TODO
|
|
614 |
|
615 |
## License
|
616 |
|
617 |
-
This project is released under the MIT license, while
|
618 |
|
619 |
## Citation
|
620 |
|
@@ -863,7 +863,7 @@ print(sess.response.text)
|
|
863 |
LMDeploy 的 `api_server` 使模型能够通过一个命令轻松打包成服务。提供的 RESTful API 与 OpenAI 的接口兼容。以下是服务启动的示例:
|
864 |
|
865 |
```shell
|
866 |
-
lmdeploy serve api_server OpenGVLab/InternVL2-26B --
|
867 |
```
|
868 |
|
869 |
为了使用OpenAI风格的API接口,您需要安装OpenAI:
|
@@ -880,7 +880,7 @@ from openai import OpenAI
|
|
880 |
client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')
|
881 |
model_name = client.models.list().data[0].id
|
882 |
response = client.chat.completions.create(
|
883 |
-
model=
|
884 |
messages=[{
|
885 |
'role':
|
886 |
'user',
|
|
|
567 |
LMDeploy's `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:
|
568 |
|
569 |
```shell
|
570 |
+
lmdeploy serve api_server OpenGVLab/InternVL2-26B --backend turbomind --server-port 23333 --chat-template chat_template.json
|
571 |
```
|
572 |
|
573 |
To use the OpenAI-style interface, you need to install OpenAI:
|
|
|
584 |
client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')
|
585 |
model_name = client.models.list().data[0].id
|
586 |
response = client.chat.completions.create(
|
587 |
+
model=model_name,
|
588 |
messages=[{
|
589 |
'role':
|
590 |
'user',
|
|
|
614 |
|
615 |
## License
|
616 |
|
617 |
+
This project is released under the MIT license, while InternLM2 is licensed under the Apache-2.0 license.
|
618 |
|
619 |
## Citation
|
620 |
|
|
|
863 |
LMDeploy 的 `api_server` 使模型能够通过一个命令轻松打包成服务。提供的 RESTful API 与 OpenAI 的接口兼容。以下是服务启动的示例:
|
864 |
|
865 |
```shell
|
866 |
+
lmdeploy serve api_server OpenGVLab/InternVL2-26B --backend turbomind --server-port 23333 --chat-template chat_template.json
|
867 |
```
|
868 |
|
869 |
为了使用OpenAI风格的API接口,您需要安装OpenAI:
|
|
|
880 |
client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')
|
881 |
model_name = client.models.list().data[0].id
|
882 |
response = client.chat.completions.create(
|
883 |
+
model=model_name,
|
884 |
messages=[{
|
885 |
'role':
|
886 |
'user',
|