Update README.md

This commit is contained in:
StevenLiuWen 2024-03-08 15:41:16 +08:00
parent b3e7107168
commit 2755d4d81f

View File

@ -147,11 +147,7 @@ On the basis of `Python >= 3.8` environment, install the necessary dependencies
pip install -r requirements.txt -e . pip install -r requirements.txt -e .
``` ```
### Inference with Huggingface's Transformers ### Simple Inference Example
You can directly employ [Huggingface's Transformers](https://github.com/huggingface/transformers) for model inference.
**Simple Inference Example**
```python ```python
import torch import torch
@ -208,7 +204,7 @@ answer = tokenizer.decode(outputs[0].cpu().tolist(), skip_special_tokens=True)
print(f"{prepare_inputs['sft_format'][0]}", answer) print(f"{prepare_inputs['sft_format'][0]}", answer)
``` ```
**CLI Chat** ### CLI Chat
```bash ```bash
python cli_chat.py --model_path deepseek-ai/deepseek-vl-7b-chat python cli_chat.py --model_path deepseek-ai/deepseek-vl-7b-chat
``` ```