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

Method BartDecoding

src/fastertransformer/models/bart/BartDecoding.cc:215–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214template<typename T>
215BartDecoding<T>::BartDecoding(size_t max_batch_size,
216 size_t max_seq_len,
217 size_t mem_max_seq_len,
218 size_t beam_width,
219 size_t head_num,
220 size_t size_per_head,
221 size_t inter_size,
222 size_t d_model,
223 size_t num_layer,
224 size_t vocab_size,
225 size_t num_bucket,
226 size_t max_distance,
227 float q_scaling,
228 int start_id,
229 int end_id,
230 float beam_search_diversity_rate,
231 size_t top_k,
232 float top_p,
233 float temperature,
234 float len_penalty,
235 float repetition_penalty,
236 cudaStream_t stream,
237 cublasMMWrapper* cublas_wrapper,
238 IAllocator* allocator,
239 bool is_free_buffer_after_forward,
240 cudaDeviceProp* cuda_device_prop,
241 NcclParam tensor_para,
242 NcclParam pipeline_para,
243 ActivationType activation_type,
244 LayerNormType layernorm_type,
245 bool tie_word_embeddings,
246 std::shared_ptr<AbstractCustomComm> custom_all_reduce_comm,
247 int enable_custom_all_reduce):
248 BaseLayer(stream, cublas_wrapper, allocator, is_free_buffer_after_forward, cuda_device_prop),
249 head_num_(head_num),
250 size_per_head_(size_per_head),
251 inter_size_(inter_size),
252 d_model_(d_model),
253 num_layer_(num_layer),
254 vocab_size_(vocab_size),
255 num_bucket_(num_bucket),
256 max_distance_(max_distance),
257 q_scaling_(q_scaling),
258 start_id_(start_id),
259 end_id_(end_id),
260 beam_search_diversity_rate_(beam_search_diversity_rate),
261 hidden_units_(head_num_ * size_per_head_),
262 top_k_(top_k),
263 top_p_(top_p),
264 temperature_(temperature),
265 len_penalty_(len_penalty),
266 repetition_penalty_(repetition_penalty),
267 tensor_para_(tensor_para),
268 pipeline_para_(pipeline_para),
269 activation_type_(activation_type),
270 layernorm_type_(layernorm_type),
271 tie_word_embeddings_(tie_word_embeddings),
272 custom_all_reduce_comm_(custom_all_reduce_comm),

Callers 1

__init__Method · 0.80

Calls 1

initializeFunction · 0.85

Tested by

no test coverage detected