vllm.models.qwen3_5.nvidia.model
¶
Inference-only Qwen3.5 Series compatible with HuggingFace weights.
Classes:
-
Qwen3_5ForConditionalGeneration– -
Qwen3_5RMSNorm–Gemma-style RMS normalization backed by flashinfer kernels.
Qwen3_5ForConditionalGeneration
¶
Bases: Qwen3VLForConditionalGeneration, IsHybrid
Methods:
-
forward–Run forward pass for Qwen3.5.
Source code in vllm/models/qwen3_5/nvidia/model.py
799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | |
forward(input_ids, positions, intermediate_tensors=None, inputs_embeds=None, **kwargs)
¶
Run forward pass for Qwen3.5.
With mrope enabled (default for Qwen3VL-class models), positions
has shape (3, seq_len), otherwise (seq_len,).
Source code in vllm/models/qwen3_5/nvidia/model.py
Qwen3_5RMSNorm
¶
Bases: Module
Gemma-style RMS normalization backed by flashinfer kernels.
When residual is given, the fused add + norm runs in place and the
updated (x, residual) pair is returned.
reduce_inputs: in forward_fused, an x that comes with a
residual is the un-reduced TP partial of a row-parallel linear, and the
norm absorbs its all-reduce. An x without a residual (first decoder
layer, MTP layer) is always complete.
Methods:
-
forward_fused–forwardwith the preceding TP all-reduce (reduce_inputs)
Source code in vllm/models/qwen3_5/nvidia/model.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
forward_fused(x, residual, linear, *, write_y=False)
¶
forward with the preceding TP all-reduce (reduce_inputs)
and the consumer linear's input quantization fused in.
When linear's input quant key is supported, the normed activation
is quantized for it; x is then not modified.
Returns the quantized normed activation (or None), the normed
activation in x's dtype (when the quantized one is None, or when
write_y; else None) and the residual (x when residual is None).
Source code in vllm/models/qwen3_5/nvidia/model.py
_fused_gdn_gated_rms_norm_quant(*, x, out, out_proj, **kwargs)
¶
GDN gated norm, quantized for out_proj when it takes static FP8.
Source code in vllm/models/qwen3_5/nvidia/model.py
_norm_quant_key(linear)
¶
The input quant key of linear that the fused norms can produce.
Checked per call: keys are exposed after weight loading, and LoRA hides them (requires_unquantized_input).