| 221 | |
| 222 | template<typename T> |
| 223 | T5Decoder<T>::T5Decoder(size_t max_batch_size, |
| 224 | size_t head_num, |
| 225 | size_t size_per_head, |
| 226 | size_t inter_size, |
| 227 | size_t d_model, |
| 228 | size_t num_layer, |
| 229 | size_t expert_num, |
| 230 | size_t moe_k, |
| 231 | float layernorm_eps, |
| 232 | std::vector<int64_t> moe_layer_index, |
| 233 | cudaStream_t stream, |
| 234 | cublasMMWrapper* cublas_wrapper, |
| 235 | IAllocator* allocator, |
| 236 | bool is_free_buffer_after_forward, |
| 237 | NcclParam tensor_para, |
| 238 | NcclParam pipeline_para, |
| 239 | ActivationType activation_type, |
| 240 | float q_scaling, |
| 241 | std::shared_ptr<AbstractCustomComm> custom_all_reduce_comm, |
| 242 | int enable_custom_all_reduce, |
| 243 | LinearAdapterConfig const& adapter_config): |
| 244 | BaseLayer(stream, cublas_wrapper, allocator, is_free_buffer_after_forward), |
| 245 | max_batch_size_(max_batch_size), |
| 246 | head_num_(head_num), |
| 247 | size_per_head_(size_per_head), |
| 248 | inter_size_(inter_size), |
| 249 | d_model_(d_model), |
| 250 | num_layer_(num_layer), |
| 251 | expert_num_(expert_num), |
| 252 | moe_k_(moe_k), |
| 253 | moe_layer_index_(moe_layer_index), |
| 254 | layernorm_eps_(layernorm_eps), |
| 255 | hidden_units_(head_num_ * size_per_head), |
| 256 | tensor_para_(tensor_para), |
| 257 | pipeline_para_(pipeline_para), |
| 258 | activation_type_(activation_type), |
| 259 | q_scaling_(q_scaling), |
| 260 | custom_all_reduce_comm_(custom_all_reduce_comm), |
| 261 | enable_custom_all_reduce_(enable_custom_all_reduce), |
| 262 | adapter_config_{adapter_config} |
| 263 | { |
| 264 | initialize(); |
| 265 | } |
| 266 | |
| 267 | template<typename T> |
| 268 | T5Decoder<T>::T5Decoder(T5Decoder<T> const& decoder): |
nothing calls this directly
no test coverage detected