Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/best_practices/ERNIE-4.5-0.3B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
- `--quantization`: indicates the quantization strategy used by the model. Different quantization strategies will result in different performance and accuracy of the model. It could be one of `wint8` / `wint4` / `block_wise_fp8`(Hopper is needed).
- `--max-model-len`: Indicates the maximum number of tokens supported by the currently deployed service. The larger the value, the longer the context length the model can support, but the more GPU memory is occupied, which may affect the concurrency.
- `--load_choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.
- `--load-choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.

For more parameter meanings and default settings, see [FastDeploy Parameter Documentation](../parameters.md)。

Expand Down
4 changes: 2 additions & 2 deletions docs/best_practices/ERNIE-4.5-21B-A3B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
- `--quantization`: indicates the quantization strategy used by the model. Different quantization strategies will result in different performance and accuracy of the model. It could be one of `wint8` / `wint4` / `block_wise_fp8`(Hopper is needed).
- `--max-model-len`: Indicates the maximum number of tokens supported by the currently deployed service. The larger the value, the longer the context length the model can support, but the more GPU memory is occupied, which may affect the concurrency.
- `--load_choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.
- `--load-choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.

For more parameter meanings and default settings, see [FastDeploy Parameter Documentation](../parameters.md)。

Expand Down
4 changes: 2 additions & 2 deletions docs/best_practices/ERNIE-4.5-21B-A3B-Thinking.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Start the service by following command:
```bash
python -m fastdeploy.entrypoints.openai.api_server \
--model baidu/ERNIE-4.5-21B-A3B-Thinking \
--load_choices "default_v1" \
--load-choices "default_v1" \
--tensor-parallel-size 1 \
--max-model-len 131072 \
--quantization wint8 \
Expand All @@ -37,7 +37,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
```
- `--quantization`: Indicates the quantization strategy used by the model. Different quantization strategies will result in different performance and accuracy of the model. It could be one of `wint8` / `wint4` / `block_wise_fp8`(Hopper is needed).
- `--max-model-len`: Indicates the maximum number of tokens supported by the currently deployed service. The larger the value, the longer the context length the model can support, but the more GPU memory is occupied, which may affect the concurrency.
- `--load_choices`: Indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.
- `--load-choices`: Indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.
- `--reasoning-parser`, `--tool-call-parser`: Indicates the corresponding reasoning content and tool call parser.

For more parameter meanings and default settings, see [FastDeploy Parameter Documentation](../parameters.md)。
Expand Down
6 changes: 3 additions & 3 deletions docs/best_practices/ERNIE-4.5-300B-A47B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
- `--quantization`: indicates the quantization strategy used by the model. Different quantization strategies will result in different performance and accuracy of the model. It could be one of `wint8` / `wint4` / `block_wise_fp8`(Hopper is needed).
- `--max-model-len`: Indicates the maximum number of tokens supported by the currently deployed service. The larger the value, the longer the context length the model can support, but the more GPU memory is occupied, which may affect the concurrency.
- `--load_choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.
- `--load-choices`: indicates the version of the loader. "default_v1" means enabling the v1 version of the loader, which has faster loading speed and less memory usage.

For more parameter meanings and default settings, see [FastDeploy Parameter Documentation](../parameters.md)。

Expand Down Expand Up @@ -91,7 +91,7 @@ Just specify the corresponding model name in the startup command, `baidu/ERNIE-4
```

Note:
- W4A8C8 quantized models are not supported when loaded via `--load_choices "default_v1"`.
- W4A8C8 quantized models are not supported when loaded via `--load-choices "default_v1"`.

#### 2.2.6 Rejection Sampling
**Idea:**
Expand Down
4 changes: 2 additions & 2 deletions docs/get_started/quick_start_qwen.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For more information about how to install FastDeploy, refer to the [installation
After installing FastDeploy, execute the following command in the terminal to start the service. For the configuration method of the startup command, refer to [Parameter Description](../parameters.md)

> ⚠️ **Note:**
> When using HuggingFace models (torch format), you need to enable `--load_choices "default_v1"`.
> When using HuggingFace models (torch format), you need to enable `--load-choices "default_v1"`.

```
export ENABLE_V1_KVCACHE_SCHEDULER=1
Expand All @@ -27,7 +27,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
--engine-worker-queue-port 8182 \
--max-model-len 32768 \
--max-num-seqs 32 \
--load_choices "default_v1"
--load-choices "default_v1"
```

> 💡 Note: In the path specified by ```--model```, if the subdirectory corresponding to the path does not exist in the current directory, it will try to query whether AIStudio has a preset model based on the specified model name (such as ```Qwen/QWEN3-0.6b```). If it exists, it will automatically start downloading. The default download path is: ```~/xx```. For instructions and configuration on automatic model download, see [Model Download](../supported_models.md).
Expand Down
4 changes: 2 additions & 2 deletions docs/supported_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export FD_MODEL_SOURCE=AISTUDIO # "AISTUDIO", "MODELSCOPE" or "HUGGINGFACE"
export FD_MODEL_CACHE=/ssd1/download_models
```

> ⭐ **Note**: Models marked with an asterisk can directly use **HuggingFace Torch weights** and support **FP8/WINT8/WINT4** as well as **BF16**. When running inference, you need to enable **`--load_choices "default_v1"`**.
> ⭐ **Note**: Models marked with an asterisk can directly use **HuggingFace Torch weights** and support **FP8/WINT8/WINT4** as well as **BF16**. When running inference, you need to enable **`--load-choices "default_v1"`**.

> Example launch Command using baidu/ERNIE-4.5-21B-A3B-PT:
```
Expand All @@ -24,7 +24,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
--engine-worker-queue-port 8182 \
--max-model-len 32768 \
--max-num-seqs 32 \
--load_choices "default_v1"
--load-choices "default_v1"
```

## Large Language Models
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/best_practices/ERNIE-4.5-0.3B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
其中:
- `--quantization`: 表示模型采用的量化策略。不同量化策略,模型的性能和精度也会不同。可选值包括:`wint8` / `wint4` / `block_wise_fp8`(需要Hopper架构)。
- `--max-model-len`:表示当前部署的服务所支持的最长Token数量。设置得越大,模型可支持的上下文长度也越大,但相应占用的显存也越多,可能影响并发数。
- `--load_choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。
- `--load-choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。

更多的参数含义与默认设置,请参见[FastDeploy参数说明](../parameters.md)。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/best_practices/ERNIE-4.5-21B-A3B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
其中:
- `--quantization`: 表示模型采用的量化策略。不同量化策略,模型的性能和精度也会不同。可选值包括:`wint8` / `wint4` / `block_wise_fp8`(需要Hopper架构)。
- `--max-model-len`:表示当前部署的服务所支持的最长Token数量。设置得越大,模型可支持的上下文长度也越大,但相应占用的显存也越多,可能影响并发数。
- `--load_choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。
- `--load-choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。

更多的参数含义与默认设置,请参见[FastDeploy参数说明](../parameters.md)。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/best_practices/ERNIE-4.5-21B-A3B-Thinking.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ERNIE-4.5-21B-A3B 各量化精度,在下列硬件上部署所需要的最小
```bash
python -m fastdeploy.entrypoints.openai.api_server \
--model baidu/ERNIE-4.5-21B-A3B-Thinking \
--load_choices "default_v1" \
--load-choices "default_v1" \
--tensor-parallel-size 1 \
--max-model-len 131072 \
--quantization wint8 \
Expand All @@ -38,7 +38,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
其中:
- `--quantization`: 表示模型采用的量化策略。不同量化策略,模型的性能和精度也会不同。可选值包括:`wint8` / `wint4` / `block_wise_fp8`(需要Hopper架构)。
- `--max-model-len`:表示当前部署的服务所支持的最长Token数量。设置得越大,模型可支持的上下文长度也越大,但相应占用的显存也越多,可能影响并发数。
- `--load_choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。
- `--load-choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。
- `--reasoning-parser` 、 `--tool-call-parser`: 表示对应调用的思考内容和工具调用解析器

更多的参数含义与默认设置,请参见[FastDeploy参数说明](../parameters.md)。
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/best_practices/ERNIE-4.5-300B-A47B-Paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ python -m fastdeploy.entrypoints.openai.api_server \
--quantization wint4 \
--max-model-len 32768 \
--max-num-seqs 128 \
--load_choices "default_v1"
--load-choices "default_v1"
```
其中:
- `--quantization`: 表示模型采用的量化策略。不同量化策略,模型的性能和精度也会不同。可选值包括:`wint8` / `wint4` / `block_wise_fp8`(需要Hopper架构)。
- `--max-model-len`:表示当前部署的服务所支持的最长Token数量。设置得越大,模型可支持的上下文长度也越大,但相应占用的显存也越多,可能影响并发数。
- `--load_choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。
- `--load-choices`: 表示loader的版本,"default_v1"表示启用v1版本的loader,具有更快的加载速度和更少的内存使用。

更多的参数含义与默认设置,请参见[FastDeploy参数说明](../parameters.md)。

Expand Down Expand Up @@ -92,7 +92,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
```

注:
- W4A8C8量化的模型不支持通过`--load_choices "default_v1"`载入。
- W4A8C8量化的模型不支持通过`--load-choices "default_v1"`载入。

#### 2.2.6 拒绝采样
**原理:**
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/get_started/quick_start_qwen.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
安装FastDeploy后,在终端执行如下命令,启动服务,其中启动命令配置方式参考[参数说明](../parameters.md)

> ⚠️ **注意:**
> 当使用HuggingFace 模型(torch格式)时, 需要开启 `--load_choices "default_v1"`
> 当使用HuggingFace 模型(torch格式)时, 需要开启 `--load-choices "default_v1"`

```shell
export ENABLE_V1_KVCACHE_SCHEDULER=1
Expand All @@ -26,7 +26,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
--engine-worker-queue-port 8182 \
--max-model-len 32768 \
--max-num-seqs 32 \
--load_choices "default_v1"
--load-choices "default_v1"
```

>💡 注意:在 ```--model``` 指定的路径中,若当前目录下不存在该路径对应的子目录,则会尝试根据指定的模型名称(如 ```Qwen/Qwen3-0.6B```)查询AIStudio是否存在预置模型,若存在,则自动启动下载。默认的下载路径为:```~/xx```。关于模型自动下载的说明和配置参阅[模型下载](../supported_models.md)。
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/supported_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export FD_MODEL_SOURCE=AISTUDIO # "AISTUDIO", "MODELSCOPE" or "HUGGINGFACE"
export FD_MODEL_CACHE=/ssd1/download_models
```

> ⭐ **说明**:带星号的模型可直接使用 **HuggingFace Torch 权重**,支持 **FP8/WINT8/WINT4 动态量化** 和 **BF16 精度** 推理,推理时需启用 **`--load_choices "default_v1"`**。
> ⭐ **说明**:带星号的模型可直接使用 **HuggingFace Torch 权重**,支持 **FP8/WINT8/WINT4 动态量化** 和 **BF16 精度** 推理,推理时需启用 **`--load-choices "default_v1"`**。

> 以baidu/ERNIE-4.5-21B-A3B-PT为例启动命令如下
```
Expand All @@ -24,7 +24,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
--engine-worker-queue-port 8182 \
--max-model-len 32768 \
--max-num-seqs 32 \
--load_choices "default_v1"
--load-choices "default_v1"
```

## 纯文本模型列表
Expand Down
2 changes: 1 addition & 1 deletion fastdeploy/engine/args_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
# Load group
load_group = parser.add_argument_group("Load Configuration")
load_group.add_argument(
"--load_choices",
"--load-choices",
type=str,
default=EngineArgs.load_choices,
help="The format of the model weights to load.\
Expand Down
2 changes: 1 addition & 1 deletion fastdeploy/model_executor/load_weight_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def pdparams_weight_iterator(paddle_file_list: list[str]):
del state_dict


def load_weights_form_cache(model, weights_iterator):
def load_weights_from_cache(model, weights_iterator):
params_dict = dict(model.named_parameters())
for loaded_weight_name, loaded_weight in weights_iterator:
param = params_dict[loaded_weight_name]
Expand Down
4 changes: 2 additions & 2 deletions fastdeploy/model_executor/model_loader/default_loader_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from fastdeploy.model_executor.load_weight_utils import (
get_weight_iterator,
is_weight_cache_enabled,
load_weights_form_cache,
load_weights_from_cache,
measure_time,
save_model,
)
Expand Down Expand Up @@ -52,7 +52,7 @@ def clean_memory_fragments(self) -> None:
def load_weights(self, model, fd_config: FDConfig, enable_cache: bool = False) -> None:
weights_iterator = get_weight_iterator(fd_config.model_config.model)
if enable_cache:
load_weights_form_cache(model, weights_iterator)
load_weights_from_cache(model, weights_iterator)
else:
model.load_weights(weights_iterator)

Expand Down
2 changes: 1 addition & 1 deletion fastdeploy/model_executor/models/glm4_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def set_state_dict(self, state_dict):
"""
glm4_moe only support loader_v1.
"""
assert False, "glm4_moe only support --load_choices default_v1."
assert False, "glm4_moe only support --load-choices default_v1."

def compute_logits(self, hidden_states: paddle.Tensor):
""" """
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_fake_Glm45_AIR_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def setup_and_run_server():
"32",
"--graph-optimization-config",
'{"use_cudagraph":true}',
"--load_choices",
"--load-choices",
"default_v1",
"--lm_head-fp32",
"--quantization",
Expand Down
2 changes: 1 addition & 1 deletion tests/model_loader/test_load_ernie_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def setup_and_run_server():
"0.71",
"--reasoning-parser",
"ernie-45-vl",
"--load_choices",
"--load-choices",
"default_v1",
]

Expand Down
Loading