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

Function _create_fd_config

tests/layers/test_speculative_sampler.py:84–105  ·  view source on GitHub ↗
(max_model_len)

Source from the content-addressed store, hash-verified

82
83
84def _create_fd_config(max_model_len):
85 model_config: Mock = Mock()
86 model_config.max_model_len = max_model_len
87 model_config.architectures = ["test_model"]
88 model_config.mm_max_tokens_per_item = None
89 speculative_config = SpeculativeConfig({})
90 graph_opt_config = GraphOptimizationConfig({})
91 scheduler_config = SchedulerConfig({})
92 parallel_config = ParallelConfig({})
93 cache_config = CacheConfig({})
94 cache_config.cache_transfer_protocol = "rdma,ipc"
95 cache_config.pd_comm_port = "2334"
96 fd_config = FDConfig(
97 model_config=model_config,
98 speculative_config=speculative_config,
99 graph_opt_config=graph_opt_config,
100 scheduler_config=scheduler_config,
101 parallel_config=parallel_config,
102 cache_config=cache_config,
103 )
104
105 return fd_config
106
107
108def _create_share_inputs(max_num_seqs, max_draft_token_num, max_model_len, vocab_size):

Callers 4

test_speculative_samplerFunction · 0.85
test_mtp_samplerFunction · 0.85

Calls 6

SpeculativeConfigClass · 0.90
SchedulerConfigClass · 0.90
ParallelConfigClass · 0.90
CacheConfigClass · 0.90
FDConfigClass · 0.90

Tested by

no test coverage detected