Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8e0c8d4
support pool
lizexu123 Sep 2, 2025
57795ea
update pooling
lizexu123 Sep 8, 2025
302adb0
merge develop
lizexu123 Sep 8, 2025
87237b0
Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy …
lizexu123 Sep 9, 2025
cef99ec
add pooler_config and check
lizexu123 Sep 9, 2025
926c796
update
lizexu123 Sep 10, 2025
a76a43e
support AutoWeightsLoader load weight
lizexu123 Sep 12, 2025
344a8df
fix
lizexu123 Sep 12, 2025
5ec6a93
update
lizexu123 Sep 15, 2025
2235785
merge develop
lizexu123 Sep 15, 2025
98b32fc
delete print
lizexu123 Sep 15, 2025
4f90dfc
Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy …
lizexu123 Sep 15, 2025
0ef4c9a
update pre-commit
lizexu123 Sep 15, 2025
1daacb7
fix
lizexu123 Sep 15, 2025
9d1a011
fix xpu
lizexu123 Sep 15, 2025
2eff16e
fix ModelRegistry->model_registry
lizexu123 Sep 15, 2025
9fcd05e
fix Copilot review
lizexu123 Sep 16, 2025
945cba5
fix pooler.py
lizexu123 Sep 16, 2025
6f545aa
delete StepPooler
lizexu123 Sep 16, 2025
222d1b2
fix abstract
lizexu123 Sep 16, 2025
97b4649
fix default_loader_v1
lizexu123 Sep 16, 2025
4cf6164
fix Pre Commit
lizexu123 Sep 16, 2025
db0a4bf
support torch qwen3 dense
lizexu123 Sep 16, 2025
2681765
add test and fix torch-qwen
lizexu123 Sep 16, 2025
10969cd
fix
lizexu123 Sep 16, 2025
669d712
fix
lizexu123 Sep 16, 2025
dd45025
adapter ci:
lizexu123 Sep 16, 2025
31b7311
fix review
lizexu123 Sep 17, 2025
e023c6b
fix pooling_params.py
lizexu123 Sep 17, 2025
cb80ce8
fix
lizexu123 Sep 17, 2025
893cdbb
fix tasks.py 2025
lizexu123 Sep 17, 2025
d4dcc3c
fix print and logger
lizexu123 Sep 17, 2025
41aa2c5
Modefy ModelRegistry and delete AutoWeightsLoader
lizexu123 Sep 18, 2025
8e92eb4
fix logger
lizexu123 Sep 18, 2025
91f777e
fix test_embedding
lizexu123 Sep 18, 2025
a90a091
delete T
lizexu123 Sep 18, 2025
6f6c549
fix ci bug
lizexu123 Sep 18, 2025
1fdf477
ernie4_5 model_registry
lizexu123 Sep 18, 2025
9e4d1fa
fix test
lizexu123 Sep 19, 2025
ebf4e0c
fix test
lizexu123 Sep 19, 2025
27ec018
support Qwen3-Embedding-0.6B tp=1 load
lizexu123 Sep 19, 2025
adc5b8f
fix extra code
lizexu123 Sep 19, 2025
5e264f3
fix
lizexu123 Sep 19, 2025
798f788
delete fix vocab_size
lizexu123 Sep 19, 2025
b72ac60
delete prepare_params_dict
lizexu123 Sep 19, 2025
a1de646
fix:
lizexu123 Sep 19, 2025
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
8 changes: 4 additions & 4 deletions docs/features/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Assuming you have a custom model class `MyModelForCasualLM` and a pretrained cla

```python
# File: fd_add_dummy_model/__init__.py or fd_add_dummy_model/register.py
from fastdeploy.model_registry import ModelRegistry
from fastdeploy.model_executor.models.registry import model_registry
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改动ModelRegistry实现的位置和类名的原因是什么?这种不兼容的改动,非必要不更改

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种兼容了旧的方式,vllm是放在了registry.py中,为了保持一致,类名并没有改,只是创建了一个实例

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

调用位置改了,内部代码会跑不通

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里之前ModelRegistry的调用我都做了相应的适配,ci也能过,应该不存在跑不通,内部代码是不开源的吗

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经改回去了,在model_base.py中,兼容原本的方式,不用创建实例,可以直接用类方法

from my_custom_model import MyModelForCasualLM, MyPretrainedModel
from fastdeploy.config import ErnieArchitectures

def register():
if "MyModelForCasualLM" not in ModelRegistry.get_supported_archs():
if "MyModelForCasualLM" not in model_registry.get_supported_archs():
if MyModelForCasualLM.name().startswith("Ernie"):
ErnieArchitectures.register_ernie_model_arch(MyModelForCasualLM)
ModelRegistry.register_model_class(MyModelForCasualLM)
ModelRegistry.register_pretrained_model(MyPretrainedModel)
model_registry.register_model_class(MyModelForCasualLM)
model_registry.register_pretrained_model(MyPretrainedModel)
```
Assuming you have a custom model_runner class `MyModelRunner`, you can write the following registration function:
```python
Expand Down
8 changes: 4 additions & 4 deletions docs/zh/features/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ FastDeploy 利用 Python 的 `entry_points` 机制来发现并加载插件。开

```python
# 文件:fd_add_dummy_model/__init__.py
from fastdeploy.model_registry import ModelRegistry
from fastdeploy.model_executor.models.registry import model_registry
from my_custom_model import MyModelForCasualLM, MyPretrainedModel

def register():
if "MyModelForCasualLM" not in ModelRegistry.get_supported_archs():
ModelRegistry.register_model_class(MyModelForCasualLM)
ModelRegistry.register_pretrained_model(MyPretrainedModel)
if "MyModelForCasualLM" not in model_registry.get_supported_archs():
model_registry.register_model_class(MyModelForCasualLM)
model_registry.register_pretrained_model(MyPretrainedModel)
```

#### 2. 注册插件到 `setup.py`
Expand Down
6 changes: 3 additions & 3 deletions fastdeploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def _patch_fastsafetensors():
_patch_fastsafetensors()


MODULE_ATTRS = {"ModelRegistry": ".model_executor.models.model_base:ModelRegistry", "version": ".utils:version"}
MODULE_ATTRS = {"model_registry": ".model_executor.models.registry:ModelRegistry", "version": ".utils:version"}


if typing.TYPE_CHECKING:
from fastdeploy.model_executor.models.model_base import ModelRegistry
from fastdeploy.model_executor.models.registry import model_registry
else:

def __getattr__(name: str) -> typing.Any:
Expand All @@ -116,4 +116,4 @@ def __getattr__(name: str) -> typing.Any:
print(f"module {__package__} has no attribute {name}")


__all__ = ["LLM", "SamplingParams", "ModelRegistry", "version"]
__all__ = ["LLM", "SamplingParams", "model_registry", "version"]
Loading
Loading