Skip to content

Commit 52dc131

Browse files
committed
merge main
1 parent 6362c4a commit 52dc131

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/CN/source/lightllm/lightllm_impl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Model Backend
6868
* ``decode_batch`` : 对一个批次数据进行 ``decode``。
6969

7070
每个backend都有一个 ``model``代表一个独立的模型类, 以及一个 ``tp_rank`` 代表一个设备,可以有若干个 ``backend``。
71-
其中的 ``model`` 类负责模型在设备中真正地计算, ``lightllm\common\basemodel\basemodel.py`` 中的 ``TpPartBaseModel`` 是所有模型类的基类,该类支持张量并行。
71+
其中的 ``model`` 类负责模型在设备中真正地计算, ``lightllm\common\basemodel\basemodel.py`` 中的 ``BaseModelRunner`` 是所有模型类的基类,该类支持张量并行。
7272

7373
.. tip::
7474

docs/CN/source/models/add_new_model.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ infer_struct.py 中的 InferStateInfo 类是进行一次模型推理时,在层
8383

8484
### 模型框架类
8585

86-
basemodel.py 中的 TpPartBaseModel 类,是整个模型的入口,每个类型的模型都需要继承实现该类。该类通过类似搭积木的方式,使用推理类,权重类,状态类完成模型的加载,推理功能,其中有很多接口可以被继承实现,以完成每个模型类型自己独特的操作。
86+
basemodel.py 中的 BaseModelRunner 类,是整个模型的入口,每个类型的模型都需要继承实现该类。该类通过类似搭积木的方式,使用推理类,权重类,状态类完成模型的加载,推理功能,其中有很多接口可以被继承实现,以完成每个模型类型自己独特的操作。
8787

8888
~~~python
89-
class TpPartBaseModel:
89+
class BaseModelRunner:
9090
# weight class
9191
pre_and_post_weight_class = None
9292
transformer_weight_class = None
@@ -558,11 +558,11 @@ from lightllm.models.bloom.layer_infer.post_layer_infer import BloomPostLayerInf
558558
from lightllm.models.bloom.layer_infer.transformer_layer_infer import BloomTransformerLayerInfer
559559
from lightllm.models.bloom.layer_weights.pre_and_post_layer_weight import BloomPreAndPostLayerWeight
560560
from lightllm.models.bloom.layer_weights.transformer_layer_weight import BloomTransformerLayerWeight
561-
from lightllm.common.basemodel import InferStateInfo, TpPartBaseModel
561+
from lightllm.common.basemodel import InferStateInfo, BaseModelRunner
562562

563563
from lightllm.common.build_utils import repair_config
564564

565-
class BloomTpPartModel(TpPartBaseModel):
565+
class BloomTpPartModel(BaseModelRunner):
566566
# weight class
567567
pre_and_post_weight_class = BloomPreAndPostLayerWeight
568568
transformer_weight_class = BloomTransformerLayerWeight

docs/EN/source/lightllm/lightllm_impl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ After the ``Router`` decides which requests to use for ``prefill`` or ``decode``
6767
* ``prefill_batch``: Performs ``prefill`` on a batch of data.
6868
* ``decode_batch``: Performs ``decode`` on a batch of data.
6969

70-
Each backend has a ``model`` that represents an independent model class, and a ``tp_rank`` that represents a device. There can be several ``backends``. The ``model`` class is responsible for the actual computation on the device, and the ``TpPartBaseModel`` in ``lightllm\common\basemodel\basemodel.py`` is the base class for all model classes, supporting tensor parallelism.
70+
Each backend has a ``model`` that represents an independent model class, and a ``tp_rank`` that represents a device. There can be several ``backends``. The ``model`` class is responsible for the actual computation on the device, and the ``BaseModelRunner`` in ``lightllm\common\basemodel\basemodel.py`` is the base class for all model classes, supporting tensor parallelism.
7171

7272
.. tip::
7373

docs/EN/source/models/add_new_model.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ The InferStateInfo class in infer_struct.py is a state class that passes some im
8383

8484
### Model class
8585

86-
The TpPartBaseModel class in basemodel.py is the entry point of the entire model. Each type of model needs to inherit and implement this class. This class uses the inference class, weight class, and state class to complete the model loading and inference functions in a similar way to building blocks. Many of its interfaces can be inherited and implemented to complete the unique operations of each model type.
86+
The BaseModelRunner class in basemodel.py is the entry point of the entire model. Each type of model needs to inherit and implement this class. This class uses the inference class, weight class, and state class to complete the model loading and inference functions in a similar way to building blocks. Many of its interfaces can be inherited and implemented to complete the unique operations of each model type.
8787

8888
~~~python
89-
class TpPartBaseModel:
89+
class BaseModelRunner:
9090
# weight class
9191
pre_and_post_weight_class = None
9292
transformer_weight_class = None
@@ -560,11 +560,11 @@ from lightllm.models.bloom.layer_infer.post_layer_infer import BloomPostLayerInf
560560
from lightllm.models.bloom.layer_infer.transformer_layer_infer import BloomTransformerLayerInfer
561561
from lightllm.models.bloom.layer_weights.pre_and_post_layer_weight import BloomPreAndPostLayerWeight
562562
from lightllm.models.bloom.layer_weights.transformer_layer_weight import BloomTransformerLayerWeight
563-
from lightllm.common.basemodel import InferStateInfo, TpPartBaseModel
563+
from lightllm.common.basemodel import InferStateInfo, BaseModelRunner
564564

565565
from lightllm.common.build_utils import repair_config
566566

567-
class BloomTpPartModel(TpPartBaseModel):
567+
class BloomTpPartModel(BaseModelRunner):
568568
# weight class
569569
pre_and_post_weight_class = BloomPreAndPostLayerWeight
570570
transformer_weight_class = BloomTransformerLayerWeight

0 commit comments

Comments
 (0)