Download reference/code/Diffulex-mbd-lms/diffulex/strategy/d2f/engine/request.py from Ouzhang/hku_diffusion_dllm: direct link, hf CLI and curl.
- Browser
- Download file 683 Bytes
-
https://huggingface.co/Ouzhang/hku_diffusion_dllm/resolve/main/reference/code/Diffulex-mbd-lms/diffulex/strategy/d2f/engine/request.py
- Command line
-
hf download hf://Ouzhang/hku_diffusion_dllm/reference/code/Diffulex-mbd-lms/diffulex/strategy/d2f/engine/request.py
-
curl -L -o request.py https://huggingface.co/Ouzhang/hku_diffusion_dllm/resolve/main/reference/code/Diffulex-mbd-lms/diffulex/strategy/d2f/engine/request.py
683 Bytes
| from diffulex.config import Config | |
| from diffulex.engine.request import AutoReq | |
| from diffulex.sampling_params import SamplingParams | |
| from diffulex.strategy_template.multi_block.engine.request import MultiBlockReqTemplate | |
| class D2fReq(MultiBlockReqTemplate): | |
| """Req for D2F strategy. Accepts config for AutoReq.create().""" | |
| def __init__( | |
| self, | |
| token_ids: list[int], | |
| sampling_params: SamplingParams = SamplingParams(), | |
| config: Config | None = None, | |
| ): | |
| super().__init__(token_ids, sampling_params) | |
| # config is passed by AutoReq.create(); req attributes are set in init_multi_block() | |