-
Notifications
You must be signed in to change notification settings - Fork 551
[Bug] RuntimeError: yaml-cpp: error at line 13, column 30: bad conversion #3544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
没能复现这个问题 |
yaml-cpp 是以 csrc 源码方式编译到 turbomind中的。
0.7.3 也是用的 yaml-cpp 0.8.0,这个一直没有变过 |
建议在 LlamaTritonModel::LlamaTritonModel 中增加下关于 yaml config的日志,试试debug源码 |
加载qwen3-30b-A3B,遇到同样的问题,当设置rope_scaling_factor时,会出现 :RuntimeError: yaml-cpp: error at line 13, column 30: bad conversion。当rope_scaling_factor默认为0时,可以正常加载 报错如下: 调用代码如下: lm_engine = async_engine.AsyncEngine(model_path=args.model_path, |
抱歉,我没有留意到输入参数 --rope-scaling-factor |
我在下面的 PR 中修复了,可以验证看看。 |
This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 5 days if the stale label is not removed or if there is no further response. |
Uh oh!
There was an error while loading. Please reload this page.
Checklist
Describe the bug
使用0.8.0运行qwen3-32b时报错,此问题在相同启动命令的0.7.3中没有遇到过。
RuntimeError: yaml-cpp: error at line 13, column 30: bad conversion
经过确认,--rope-scaling-factor 无论输入多少都会报错,尝试了1.0 1.5 2.0 4.0 4,都获得了上方相同的报错,去除该参数能正常启动。
尝试了pyyaml==6.0.1与6.0.2,无效果
尝试了conda install conda-forge::yaml-cpp,无效果
2025-05-13 08:05:36,413 - lmdeploy - �[37mINFO�[0m - async_engine.py:259 - input backend=turbomind, backend_config=TurbomindEngineConfig(dtype='auto', model_format=None, tp=2, dp=1, device_num=None, attn_tp_size=None, attn_dp_size=None, mlp_tp_size=None, mlp_dp_size=None, outer_dp_size=None, session_len=131072, max_batch_size=512, cache_max_entry_count=0.85, cache_chunk_size=-1, cache_block_seq_len=128, enable_prefix_caching=True, quant_policy=0, rope_scaling_factor=4.0, use_logn_attn=False, download_dir=None, revision=None, max_prefill_token_num=32768, num_tokens_per_iter=0, max_prefill_iters=1, communicator='nccl')
2025-05-13 08:05:36,413 - lmdeploy - �[37mINFO�[0m - async_engine.py:260 - input chat_template_config=ChatTemplateConfig(model_name='qwen2d5', system=None, meta_instruction=None, eosys=None, user=None, eoh=None, assistant=None, eoa=None, tool=None, eotool=None, separator=None, capability=None, stop_words=None)
2025-05-13 08:05:36,418 - lmdeploy - �[37mINFO�[0m - async_engine.py:269 - updated chat_template_onfig=ChatTemplateConfig(model_name='qwen2d5', system=None, meta_instruction=None, eosys=None, user=None, eoh=None, assistant=None, eoa=None, tool=None, eotool=None, separator=None, capability=None, stop_words=None)
2025-05-13 08:05:36,939 - lmdeploy - �[37mINFO�[0m - turbomind.py:312 - model_source: ModelSource.HF_MODEL
2025-05-13 08:05:36,977 - lmdeploy - �[37mINFO�[0m - turbomind.py:226 - turbomind model config:
{
"model_config": {
"model_name": "",
"chat_template": "",
"model_arch": "Qwen3ForCausalLM",
"head_num": 64,
"kv_head_num": 8,
"hidden_units": 5120,
"vocab_size": 151936,
"embedding_size": 151936,
"num_layer": 64,
"inter_size": [
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600,
25600
],
"norm_eps": 1e-06,
"attn_bias": 0,
"qk_norm": true,
"size_per_head": 128,
"group_size": 64,
"weight_type": "bfloat16",
"session_len": 131072,
"attn_tp_size": 2,
"mlp_tp_size": 2,
"model_format": "hf",
"expert_num": [],
"expert_inter_size": 0,
"experts_per_token": 0,
"moe_shared_gate": false,
"norm_topk_prob": false,
"routed_scale": 1.0,
"topk_group": 1,
"topk_method": "greedy",
"moe_group_num": 1,
"q_lora_rank": 0,
"kv_lora_rank": 0,
"qk_rope_dim": 0,
"v_head_dim": 0,
"tune_layer_num": 1
},
"attention_config": {
"softmax_scale": 0.0,
"cache_block_seq_len": 128,
"use_logn_attn": 0,
"max_position_embeddings": 40960,
"rope_param": {
"type": "dynamic",
"base": 1000000.0,
"dim": 128,
"factor": 4.0,
"max_position_embeddings": null,
"attention_factor": 1.0,
"beta_fast": 32,
"beta_slow": 1,
"low_freq_factor": null,
"high_freq_factor": null,
"original_max_position_embeddings": null
}
},
"lora_config": {
"lora_policy": "",
"lora_r": 0,
"lora_scale": 0.0,
"lora_max_wo_r": 0,
"lora_rank_pattern": "",
"lora_scale_pattern": ""
},
"engine_config": {
"dtype": "auto",
"model_format": null,
"tp": 2,
"dp": 1,
"device_num": 2,
"attn_tp_size": 2,
"attn_dp_size": 1,
"mlp_tp_size": 2,
"mlp_dp_size": 1,
"outer_dp_size": 1,
"session_len": 131072,
"max_batch_size": 512,
"cache_max_entry_count": 0.85,
"cache_chunk_size": -1,
"cache_block_seq_len": 128,
"enable_prefix_caching": true,
"quant_policy": 0,
"rope_scaling_factor": 4.0,
"use_logn_attn": false,
"download_dir": null,
"revision": null,
"max_prefill_token_num": 32768,
"num_tokens_per_iter": 32768,
"max_prefill_iters": 4,
"communicator": "nccl"
}
}
Traceback (most recent call last):
File "/home/wk/miniconda3/envs/lmdeploy/bin/lmdeploy", line 8, in
sys.exit(run())
^^^^^
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/cli/entrypoint.py", line 39, in run
args.run(args)
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/cli/serve.py", line 333, in api_server
run_api_server(args.model_path,
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/serve/openai/api_server.py", line 1121, in serve
VariableInterface.async_engine = pipeline_class(model_path=model_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/serve/async_engine.py", line 277, in init
self._build_turbomind(model_path=model_path, backend_config=backend_config, **kwargs)
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/serve/async_engine.py", line 328, in _build_turbomind
self.engine = tm.TurboMind.from_pretrained(model_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/turbomind/turbomind.py", line 313, in from_pretrained
return cls(model_path=pretrained_model_name_or_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/turbomind/turbomind.py", line 149, in init
self.model_comm = self._from_hf(model_source=model_source,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wk/miniconda3/envs/lmdeploy/lib/python3.12/site-packages/lmdeploy/turbomind/turbomind.py", line 242, in _from_hf
model_comm = _tm.AbstractTransformerModel.create_llama_model(model_dir='',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: yaml-cpp: error at line 13, column 30: bad conversion
Reproduction
lmdeploy serve api_server "Qwen3-32B"
--model-name "Qwen3-32B"
--server-name 0.0.0.0
--server-port $PORT
--tp 2
--cache-max-entry-count 0.85
--tool-call-parser "qwen"
--chat-template qwen2d5
--max-prefill-token-num 32768
--rope-scaling-factor 4.0
--session-len 131072
--cache-block-seq-len 128
--enable-prefix-caching
--log-level "INFO"
>
Environment
Error traceback
The text was updated successfully, but these errors were encountered: