Skip to content

Commit c4d5bd9

Browse files
authored
Bump version to v0.7.1 (#3178)
* bump version to v0.7.1 * update pipeline guide * update * fix according reviewer's comment
1 parent 0eb625f commit c4d5bd9

File tree

10 files changed

+92
-12
lines changed

10 files changed

+92
-12
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ ______________________________________________________________________
2323

2424
## Latest News 🎉
2525

26+
<details open>
27+
<summary><b>2025</b></summary>
28+
</details>
29+
2630
<details close>
2731
<summary><b>2024</b></summary>
2832

@@ -195,9 +199,9 @@ For more information on installing on CUDA 11+ platform, or for instructions on
195199

196200
```python
197201
import lmdeploy
198-
pipe = lmdeploy.pipeline("internlm/internlm3-8b-instruct")
199-
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
200-
print(response)
202+
with lmdeploy.pipeline("internlm/internlm3-8b-instruct") as pipe:
203+
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
204+
print(response)
201205
```
202206

203207
> \[!NOTE\]

README_ja.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ ______________________________________________________________________
2323

2424
## 最新ニュース 🎉
2525

26+
<details open>
27+
<summary><b>2025</b></summary>
28+
</details>
29+
2630
<details close>
2731
<summary><b>2024</b></summary>
2832

@@ -192,9 +196,9 @@ CUDA 11+プラットフォームでのインストールに関する情報、ま
192196

193197
```python
194198
import lmdeploy
195-
pipe = lmdeploy.pipeline("internlm/internlm3-8b-instruct")
196-
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
197-
print(response)
199+
with lmdeploy.pipeline("internlm/internlm3-8b-instruct") as pipe:
200+
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
201+
print(response)
198202
```
199203

200204
> \[!NOTE\]

README_zh-CN.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ ______________________________________________________________________
2323

2424
## 最新进展 🎉
2525

26+
<details open>
27+
<summary><b>2025</b></summary>
28+
</details>
29+
2630
<details close>
2731
<summary><b>2024</b></summary>
2832

@@ -196,9 +200,9 @@ pip install lmdeploy
196200

197201
```python
198202
import lmdeploy
199-
pipe = lmdeploy.pipeline("internlm/internlm3-8b-instruct")
200-
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
201-
print(response)
203+
with lmdeploy.pipeline("internlm/internlm3-8b-instruct") as pipe:
204+
response = pipe(["Hi, pls intro yourself", "Shanghai is"])
205+
print(response)
202206
```
203207

204208
> \[!NOTE\]

docs/en/get_started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pip install lmdeploy
2323
The default prebuilt package is compiled on **CUDA 12**. If CUDA 11+ (>=11.3) is required, you can install lmdeploy by:
2424

2525
```shell
26-
export LMDEPLOY_VERSION=0.7.0.post3
26+
export LMDEPLOY_VERSION=0.7.1
2727
export PYTHON_VERSION=38
2828
pip install https://github.com/InternLM/lmdeploy/releases/download/v${LMDEPLOY_VERSION}/lmdeploy-${LMDEPLOY_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux2014_x86_64.whl --extra-index-url https://download.pytorch.org/whl/cu118
2929
```

docs/en/llm/pipeline.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ response = pipe(prompts, gen_config=gen_config, adapter_name='lora_name_1')
217217
print(response)
218218
```
219219

220+
### Release pipeline
221+
222+
You can release the pipeline explicitly by calling its `close()` method, or alternatively, use the `with` statement as demonstrated below:
223+
224+
```python
225+
from lmdeploy import pipeline
226+
227+
with pipeline('internlm/internlm2_5-7b-chat') as pipe:
228+
response = pipe(['Hi, pls intro yourself', 'Shanghai is'])
229+
print(response)
230+
```
231+
220232
## FAQs
221233

222234
- **RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase**.

docs/en/multi_modal/vl_pipeline.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,25 @@ print(sess.response.text)
213213
sess = pipe.chat('What is the woman doing?', session=sess, gen_config=gen_config)
214214
print(sess.response.text)
215215
```
216+
217+
## Release pipeline
218+
219+
You can release the pipeline explicitly by calling its `close()` method, or alternatively, use the `with` statement as demonstrated below:
220+
221+
```python
222+
from lmdeploy import pipeline
223+
224+
from lmdeploy import pipeline
225+
from lmdeploy.vl import load_image
226+
227+
with pipeline('OpenGVLab/InternVL2_5-8B') as pipe:
228+
image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
229+
response = pipe(('describe this image', image))
230+
print(response)
231+
232+
# Clear the torch cache and perform garbage collection if needed
233+
import torch
234+
import gc
235+
torch.cuda.empty_cache()
236+
gc.collect()
237+
```

docs/zh_cn/get_started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pip install lmdeploy
2323
默认的预构建包是在 **CUDA 12** 上编译的。如果需要 CUDA 11+ (>=11.3),你可以使用以下命令安装 lmdeploy:
2424

2525
```shell
26-
export LMDEPLOY_VERSION=0.7.0.post3
26+
export LMDEPLOY_VERSION=0.7.1
2727
export PYTHON_VERSION=38
2828
pip install https://github.com/InternLM/lmdeploy/releases/download/v${LMDEPLOY_VERSION}/lmdeploy-${LMDEPLOY_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux2014_x86_64.whl --extra-index-url https://download.pytorch.org/whl/cu118
2929
```

docs/zh_cn/llm/pipeline.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,18 @@ response = pipe(prompts, gen_config=gen_config, adapter_name='lora_name_1')
223223
print(response)
224224
```
225225

226+
### 释放 pipeline
227+
228+
您可以通过调用其 `close()` 方法来显式释放 pipeline,或者,也可以使用 `with` 语句,如下所示:
229+
230+
```python
231+
from lmdeploy import pipeline
232+
233+
with pipeline('internlm/internlm2_5-7b-chat') as pipe:
234+
response = pipe(['Hi, pls intro yourself', 'Shanghai is'])
235+
print(response)
236+
```
237+
226238
## 常见问题
227239

228240
- **RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase**.

docs/zh_cn/multi_modal/vl_pipeline.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,25 @@ print(sess.response.text)
213213
sess = pipe.chat('What is the woman doing?', session=sess, gen_config=gen_config)
214214
print(sess.response.text)
215215
```
216+
217+
### 释放 pipeline
218+
219+
您可以通过调用其 `close()` 方法来显式释放 pipeline,或者,也可以使用 `with` 语句,如下所示:
220+
221+
```python
222+
from lmdeploy import pipeline
223+
224+
from lmdeploy import pipeline
225+
from lmdeploy.vl import load_image
226+
227+
with pipeline('OpenGVLab/InternVL2_5-8B') as pipe:
228+
image = load_image('https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')
229+
response = pipe(('describe this image', image))
230+
print(response)
231+
232+
# Clear the torch cache and perform garbage collection if needed
233+
import torch
234+
import gc
235+
torch.cuda.empty_cache()
236+
gc.collect()
237+
```

lmdeploy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
22
from typing import Tuple
33

4-
__version__ = '0.7.0.post3'
4+
__version__ = '0.7.1'
55
short_version = __version__
66

77

0 commit comments

Comments
 (0)