MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / BartDecoder

Method BartDecoder

src/fastertransformer/models/bart/BartDecoder.cc:183–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182template<typename T>
183BartDecoder<T>::BartDecoder(size_t max_batch_size,
184 size_t head_num,
185 size_t size_per_head,
186 size_t inter_size,
187 size_t d_model,
188 size_t num_layer,
189 float layernorm_eps,
190 cudaStream_t stream,
191 cublasMMWrapper* cublas_wrapper,
192 IAllocator* allocator,
193 bool is_free_buffer_after_forward,
194 NcclParam tensor_para,
195 NcclParam pipeline_para,
196 ActivationType activation_type,
197 LayerNormType layernorm_type,
198 float q_scaling,
199 std::shared_ptr<AbstractCustomComm> custom_all_reduce_comm,
200 int enable_custom_all_reduce):
201 BaseLayer(stream, cublas_wrapper, allocator, is_free_buffer_after_forward),
202 max_batch_size_(max_batch_size),
203 head_num_(head_num),
204 size_per_head_(size_per_head),
205 inter_size_(inter_size),
206 d_model_(d_model),
207 num_layer_(num_layer),
208 layernorm_eps_(layernorm_eps),
209 hidden_units_(head_num_ * size_per_head),
210 tensor_para_(tensor_para),
211 pipeline_para_(pipeline_para),
212 activation_type_(activation_type),
213 layernorm_type_(layernorm_type),
214 q_scaling_(q_scaling),
215 custom_all_reduce_comm_(custom_all_reduce_comm),
216 enable_custom_all_reduce_(enable_custom_all_reduce)
217{
218 initialize();
219}
220
221template<typename T>
222BartDecoder<T>::BartDecoder(BartDecoder<T> const& decoder):

Callers

nothing calls this directly

Calls 1

initializeFunction · 0.85

Tested by

no test coverage detected