[Deprecation] Deprecation --convert reward, use --convert embed instead. (#30463)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
This commit is contained in:
wang.yuqi 2025-12-11 18:18:25 +08:00 committed by GitHub
parent 4515eb1a0b
commit a5f9fb5960
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 3 deletions

View File

@ -316,10 +316,13 @@ We have split the `encode` task into two more specific token-wise tasks: `token_
### Remove softmax from PoolingParams ### Remove softmax from PoolingParams
We are going to remove `softmax` and `activation` from `PoolingParams`. Instead, use `use_activation`, since we allow `classify` and `token_classify` to use any activation function. We are going to remove `softmax` and `activation` from `PoolingParams` in v0.15. Instead, use `use_activation`, since we allow `classify` and `token_classify` to use any activation function.
### as_reward_model ### as_reward_model
!!! warning
We are going to remove `--convert reward` in v0.15, use `--convert embed` instead.
Pooling models now default support all pooling, you can use it without any settings. Pooling models now default support all pooling, you can use it without any settings.
- Extracting hidden states prefers using `token_embed` task. - Extracting hidden states prefers using `token_embed` task.

View File

@ -788,6 +788,13 @@ class ModelConfig:
runner_type: RunnerType, runner_type: RunnerType,
convert: ConvertOption, convert: ConvertOption,
) -> ConvertType: ) -> ConvertType:
if convert == "reward":
logger.warning(
"`--convert reward` is deprecated and will be removed in v0.15. "
"Please use `--convert embed` instead."
)
return "embed"
if convert != "auto": if convert != "auto":
return convert return convert

View File

@ -111,13 +111,15 @@ class PoolerConfig:
def get_use_activation(o: object): def get_use_activation(o: object):
if softmax := getattr(o, "softmax", None) is not None: if softmax := getattr(o, "softmax", None) is not None:
logger.warning_once( logger.warning_once(
"softmax will be deprecated, please use use_activation instead." "softmax will be deprecated and will be removed in v0.15. "
"Please use use_activation instead."
) )
return softmax return softmax
if activation := getattr(o, "activation", None) is not None: if activation := getattr(o, "activation", None) is not None:
logger.warning_once( logger.warning_once(
"activation will be deprecated, please use use_activation instead." "activation will be deprecated and will be removed in v0.15. "
"Please use use_activation instead."
) )
return activation return activation