+7








4d51588e23
Signed-off-by: Yifan Qiao <yifanqiao@inferact.ai> Signed-off-by: Woosuk Kwon <woosuk@inferact.ai> Signed-off-by: qizixi <zixi@inferact.ai> Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: Yongye Zhu <zyy1102000@gmail.com> Co-authored-by: Yongye Zhu <zyy1102000@gmail.com> Co-authored-by: Yongye Zhu <yongye@inferact.ai> Co-authored-by: Simon Mo <simon@inferact.ai> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Giancarlo Delfin <gdelfin@inferact.ai> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Roger Wang <hey@rogerw.io> Co-authored-by: Roy Wang <yasong.wang@inferact.ai> Co-authored-by: Woosuk Kwon <woosuk@inferact.ai> Co-authored-by: youkaichao <youkaichao@gmail.com> Co-authored-by: Zhewen Li <jerven.vllm@gmail.com> Co-authored-by: Zijing Liu <liuzijing2014@gmail.com> Co-authored-by: khluu <khluu000@gmail.com> Co-authored-by: qizixi <zixi@inferact.ai> Co-authored-by: Zhewen Li <zhewenli@inferact.ai>
24 lines
737 B
Python
Executable File
24 lines
737 B
Python
Executable File
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
from typing import Any
|
|
|
|
from transformers import PretrainedConfig
|
|
|
|
|
|
class DeepseekV4Config(PretrainedConfig):
|
|
model_type = "deepseek_v4"
|
|
|
|
def __init__(
|
|
self,
|
|
max_position_embeddings: int = 1048576,
|
|
rope_scaling: dict[str, Any] | None = None,
|
|
rope_parameters: dict[str, Any] | None = None,
|
|
rope_theta: float = 10000.0,
|
|
**kwargs,
|
|
):
|
|
self.max_position_embeddings = max_position_embeddings
|
|
self.rope_scaling = rope_scaling
|
|
self.rope_theta = rope_theta
|
|
self.rope_parameters = rope_scaling or rope_parameters
|
|
super().__init__(**kwargs)
|