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

Function build_config_json

tests/worker/test_gpu_prompt_logprobs.py:106–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105
106def build_config_json() -> str:
107 config_dict = {
108 "architectures": ["Qwen3MoeForCausalLM"],
109 "hidden_size": 7168,
110 "moe_intermediate_size": 1,
111 "moe_num_experts": 1,
112 "moe_k": 1,
113 "hidden_act": "silu",
114 "num_attention_heads": 64,
115 "dtype": "bfloat16",
116 }
117
118 tmp_dir = f"./tmpefef{paddle.distributed.get_rank()}"
119 os.makedirs(tmp_dir, exist_ok=True)
120 with open(f"./{tmp_dir}/config.json", "w") as f:
121 json.dump(config_dict, f)
122 model_name_or_path = os.path.join(os.getcwd(), tmp_dir)
123 print("model_name_or_path", model_name_or_path)
124 return model_name_or_path
125
126
127def get_fd_config(batch_size: int):

Callers 1

get_fd_configFunction · 0.70

Calls 4

printFunction · 0.85
get_rankMethod · 0.80
dumpMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected