模型问题

在对话式搜索中,您可能会遇到间歇性的 404 错误、延迟增加、 Kafka 锁超时以及 watsonx 的 ESOCKETTIMEDOUT 错误。

高延迟、超时问题和404错误

症状
可能会出现以下问题
  • HTTP 404 错误请求超时问题时有发生
  • 诸如以下这类的备用响应: 恐怕我没明白。 请重新表述您的问题。
  • 与之前的版本相比, 响应时间显著延长(例如,CPD 5.3.0 上的平均 8.54s 值,与 CPD 5.2.2 上的 3.88s 相比)
  • KafkaJSNonRetriableError: Timeout while acquiring lock Pod 日志中的 wa-store 错误
  • ESOCKETTIMEDOUT 在调用 watsonx 进行对话式搜索时出现的错误

受影响的型号: granite-3-8b-instruct

受影响区域:WXA CPD、 5.3.x、Medium-HPA

根本原因
IFM( IBM 基础模型)堆栈中的模型 granite-3-8b-instruct 在并发配置和 vLLM 配置参数未优化状态下运行,导致在负载下出现请求积压、GPU争用严重以及下游超时连锁反应。
解决方案
granite-3-8b-instruct执行以下 oc patch 命令,根据. 的正确并发数和 vLLM 环境设置来调整自定义资源 watsonxaiifm
补丁 1:设置路由器并发数

应用此补丁

oc patch watsonxaiifm watsonxaiifm-cr --type=merge -p '{"spec":{"model_install_parameters":{"granite_3_8b_instruct":{"wx_router_concur_req":"16"}}}}'
补丁 2:完整的 vLLM 参数配置

请在命名空间中 cpd 应用此补丁,以全面调整 vLLM 的运行时设置:

oc patch watsonxaiifm watsonxaiifm-cr -n cpd --type=merge -p '{
  "spec": {
    "model_install_parameters": {
      "granite_3_8b_instruct": {
        "wx_router_concur_req": "16",
        "env": [
          {"name": "VLLM_CACHE_ROOT",        "value": "/tmp/vllm_cache"},
          {"name": "MODEL_NAME",              "value": "/mnt/models/granite-3-8b-instruct"},
          {"name": "DTYPE_STR",               "value": "float16"},
          {"name": "MAX_BATCH_SIZE",          "value": "16"},
          {"name": "MAX_NEW_TOKENS",          "value": "8192"},
          {"name": "SERVED_MODEL_NAME",       "value": "ibm/granite-3-8b-instruct"},
          {"name": "ENABLE_AUTO_TOOL_CHOICE", "value": "true"},
          {"name": "TOOL_CALL_PARSER",        "value": "granite"},
          {"name": "CHAT_TEMPLATE",           "value": "/mnt/models/granite-3-8b-instruct/tool_chat_template_granite.jinja"},
          {"name": "NUM_GPUS",                "value": "1"},
          {"name": "CUDA_VISIBLE_DEVICES",    "value": "0"},
          {"name": "HUGGINGFACE_HUB_CACHE",   "value": "/mnt/models/"},
          {"name": "HF_MODULES_CACHE",        "value": "/tmp/huggingface/modules"},
          {"name": "PORT",                    "value": "3000"},
          {"name": "MAX_LOG_LEN",             "value": "100"},
          {"name": "GPRC_PORT",               "value": "8033"}
        ]
      }
    }
  }
}'
结果
确保平均响应时间合理、错误率降低(包括 404s 和超时),且Pod日志中 wa-store 不存在 ESOCKETTIMEDOUT 或 Kafka 锁定超时错误。