2025-10-14 10:38:28 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
|
|
import torch
|
2026-08-27 15:11:51 +08:00
|
|
|
from vllm.config import VllmConfig
|
|
|
|
|
from vllm.v1.spec_decode.eagle import EagleProposer
|
2025-10-14 10:38:28 +08:00
|
|
|
|
2026-08-27 15:11:51 +08:00
|
|
|
from vllm_ascend.spec_decode.llm_base_proposer import AscendSpecDecodeBaseProposer
|
2025-10-14 10:38:28 +08:00
|
|
|
|
|
|
|
|
|
2026-08-27 15:11:51 +08:00
|
|
|
class AscendEagleProposer(EagleProposer, AscendSpecDecodeBaseProposer):
|
|
|
|
|
def __init__(self, vllm_config: VllmConfig, device: torch.device, runner=None):
|
|
|
|
|
AscendSpecDecodeBaseProposer.__init__(self, vllm_config, device, True, runner=runner)
|