Sub 655 root causes (confirmed from log analysis): 1. protocol.py: max_completion_tokens never folded into max_tokens → 162/881 replay requests rejected 400 (extra_forbidden) 2. max_num_seqs=1 → t2_n_2 test fails (needs n=2) 3. max_model_len=131072 → OOM crash at 62% replay, opencompass all 0 Fixes: - protocol.py: model_validator fold_max_completion_tokens - yaml: max_num_seqs=2, max_model_len=80000, PYTORCH_CUDA_ALLOC_CONF - topk_softmax stays =0 (corex CUB BlockReduce incompatible on BI-V100) xllm_latest import to ex_engine/: - npu_torch layers: GDN(1164L), Qwen3.5 GDN, attention, fused_moe - cuda/moe kernels: topk_softmax_kernels.cuh, moe_combine, moe_compute_index - npu kernels: causal_conv1d, recurrent_gated_delta_rule - model headers: qwen3_5.h, qwen3_next.h
60 lines
2.1 KiB
C++
60 lines
2.1 KiB
C++
/* Copyright 2025-2026 The xLLM Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://github.com/jd-opensource/xllm/blob/main/LICENSE
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
==============================================================================*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "models/llm/qwen3_5.h"
|
|
#include "models/llm/qwen3_5_mtp_base.h"
|
|
#include "models/model_registry.h"
|
|
|
|
namespace xllm {
|
|
|
|
class Qwen3_5MtpModelImpl final : public Qwen3_5MtpModelImplBase {
|
|
public:
|
|
explicit Qwen3_5MtpModelImpl(const ModelContext& context)
|
|
: Qwen3_5MtpModelImplBase(context) {}
|
|
};
|
|
|
|
class Qwen3_5MtpForCausalLMImpl final : public Qwen3_5MtpForCausalLMImplBase {
|
|
public:
|
|
explicit Qwen3_5MtpForCausalLMImpl(const ModelContext& context)
|
|
: Qwen3_5MtpForCausalLMImplBase(
|
|
context,
|
|
std::make_shared<Qwen3_5MtpModelImpl>(context)) {}
|
|
};
|
|
TORCH_MODULE(Qwen3_5MtpForCausalLM);
|
|
|
|
REGISTER_CAUSAL_MODEL(qwen3_5_mtp, Qwen3_5MtpForCausalLM);
|
|
REGISTER_CAUSAL_MODEL(qwen3_5_moe_mtp, Qwen3_5MtpForCausalLM);
|
|
|
|
REGISTER_MODEL_ARGS_LOADER(qwen3_5_mtp,
|
|
[](const JsonReader& json, ModelArgs* args) {
|
|
return qwen3_5_mtp::load_model_args(
|
|
json, args, "qwen3_5_text", "qwen3_5_mtp");
|
|
});
|
|
|
|
REGISTER_MODEL_ARGS_LOADER(qwen3_5_moe_mtp,
|
|
[](const JsonReader& json, ModelArgs* args) {
|
|
return qwen3_5_mtp::load_model_args(
|
|
json,
|
|
args,
|
|
"qwen3_5_moe_text",
|
|
"qwen3_5_moe_mtp");
|
|
});
|
|
|
|
} // namespace xllm
|