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

Function get_fd_config

tests/layers/test_sampler.py:105–128  ·  view source on GitHub ↗
(batch_size: int)

Source from the content-addressed store, hash-verified

103
104
105def get_fd_config(batch_size: int):
106 fd_config = FDConfig(
107 model_config=ModelConfig(
108 {
109 "model": build_config_json(),
110 "max_model_len": 2048,
111 }
112 ),
113 parallel_config=ParallelConfig(
114 {
115 "tensor_parallel_size": 1,
116 "expert_parallel_size": 1,
117 "expert_parallel_rank": 0,
118 "data_parallel_size": 1,
119 }
120 ),
121 # quant_config=BlockWiseFP8Config(weight_block_size=[128, 128]),
122 scheduler_config=SchedulerConfig({"max_num_seqs": batch_size}),
123 cache_config=CacheConfig({}),
124 graph_opt_config=GraphOptimizationConfig({}),
125 load_config=LoadConfig({}),
126 ips="0.0.0.0",
127 )
128 return fd_config
129
130
131def test_sampler():

Callers 2

test_samplerFunction · 0.70
test_sampler_logprobsFunction · 0.70

Calls 8

FDConfigClass · 0.90
ModelConfigClass · 0.90
ParallelConfigClass · 0.90
SchedulerConfigClass · 0.90
CacheConfigClass · 0.90
LoadConfigClass · 0.90
build_config_jsonFunction · 0.70

Tested by

no test coverage detected