MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / __init__

Method __init__

tests/conftest.py:27–55  ·  view source on GitHub ↗
(
        self,
        model_name_or_path: str,
        tensor_parallel_size: int = 1,
        max_num_seqs: int = 1,
        max_model_len: int = 1024,
        load_choices: str = "default",
        quantization: str = "None",
        **kwargs,
    )

Source from the content-addressed store, hash-verified

25
26class FDRunner:
27 def __init__(
28 self,
29 model_name_or_path: str,
30 tensor_parallel_size: int = 1,
31 max_num_seqs: int = 1,
32 max_model_len: int = 1024,
33 load_choices: str = "default",
34 quantization: str = "None",
35 **kwargs,
36 ) -> None:
37 from fastdeploy.entrypoints.llm import LLM
38
39 clean_ports()
40 time.sleep(10)
41 graph_optimization_config = {"use_cudagraph": False}
42 self.llm = LLM(
43 model=model_name_or_path,
44 tensor_parallel_size=tensor_parallel_size,
45 max_num_seqs=max_num_seqs,
46 max_model_len=max_model_len,
47 load_choices=load_choices,
48 quantization=quantization,
49 max_num_batched_tokens=max_model_len,
50 graph_optimization_config=graph_optimization_config,
51 port=FD_API_PORT,
52 cache_queue_port=FD_CACHE_QUEUE_PORT,
53 engine_worker_queue_port=FD_ENGINE_QUEUE_PORT,
54 **kwargs,
55 )
56
57 def generate(
58 self,

Callers

nothing calls this directly

Calls 3

clean_portsFunction · 0.90
LLMClass · 0.90
sleepMethod · 0.45

Tested by

no test coverage detected