update readme

Former-commit-id: 261f631a1cc708a5713e40102ad558c5dfa6a379
This commit is contained in:
hiyouga 2024-02-25 16:26:08 +08:00
parent db53b67fe4
commit 116de2ce48
2 changed files with 8 additions and 8 deletions

View File

@ -516,7 +516,7 @@ python src/export_model.py \
> [!TIP] > [!TIP]
> Use `--export_quantization_bit 4` and `--export_quantization_dataset data/c4_demo.json` to quantize the model after merging the LoRA weights. > Use `--export_quantization_bit 4` and `--export_quantization_dataset data/c4_demo.json` to quantize the model after merging the LoRA weights.
### API Demo ### Inference with OpenAI-style API
```bash ```bash
python src/api_demo.py \ python src/api_demo.py \
@ -529,7 +529,7 @@ python src/api_demo.py \
> [!TIP] > [!TIP]
> Visit `http://localhost:8000/docs` for API documentation. > Visit `http://localhost:8000/docs` for API documentation.
### CLI Demo ### Inference with command line
```bash ```bash
python src/cli_demo.py \ python src/cli_demo.py \
@ -539,7 +539,7 @@ python src/cli_demo.py \
--finetuning_type lora --finetuning_type lora
``` ```
### Web Demo ### Inference with web browser
```bash ```bash
python src/web_demo.py \ python src/web_demo.py \
@ -576,7 +576,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--template default \ --template default \
--finetuning_type lora \ --finetuning_type lora \
--output_dir path_to_predict_result \ --output_dir path_to_predict_result \
--per_device_eval_batch_size 8 \ --per_device_eval_batch_size 1 \
--max_samples 100 \ --max_samples 100 \
--predict_with_generate \ --predict_with_generate \
--fp16 --fp16

View File

@ -516,7 +516,7 @@ python src/export_model.py \
> [!TIP] > [!TIP]
> 合并 LoRA 权重之后可再次使用 `--export_quantization_bit 4``--export_quantization_dataset data/c4_demo.json` 量化模型。 > 合并 LoRA 权重之后可再次使用 `--export_quantization_bit 4``--export_quantization_dataset data/c4_demo.json` 量化模型。
### API 服务 ### 使用 OpenAI 风格 API 推理
```bash ```bash
python src/api_demo.py \ python src/api_demo.py \
@ -529,7 +529,7 @@ python src/api_demo.py \
> [!TIP] > [!TIP]
> 关于 API 文档请见 `http://localhost:8000/docs` > 关于 API 文档请见 `http://localhost:8000/docs`
### 命令行测试 ### 使用命令行推理
```bash ```bash
python src/cli_demo.py \ python src/cli_demo.py \
@ -539,7 +539,7 @@ python src/cli_demo.py \
--finetuning_type lora --finetuning_type lora
``` ```
### 浏览器测试 ### 使用浏览器推理
```bash ```bash
python src/web_demo.py \ python src/web_demo.py \
@ -576,7 +576,7 @@ CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
--template default \ --template default \
--finetuning_type lora \ --finetuning_type lora \
--output_dir path_to_predict_result \ --output_dir path_to_predict_result \
--per_device_eval_batch_size 8 \ --per_device_eval_batch_size 1 \
--max_samples 100 \ --max_samples 100 \
--predict_with_generate \ --predict_with_generate \
--fp16 --fp16