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

Method initialize

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

Source from the content-addressed store, hash-verified

24
25template<typename T>
26void BartDecoding<T>::initialize()
27{
28 decoder_ = new BartDecoder<T>(0, // max_batch_size_ * beam_width_,
29 head_num_,
30 size_per_head_,
31 inter_size_,
32 d_model_,
33 num_layer_,
34 layernorm_eps_,
35 stream_,
36 cublas_wrapper_,
37 allocator_,
38 is_free_buffer_after_forward_,
39 tensor_para_,
40 pipeline_para_,
41 activation_type_,
42 layernorm_type_,
43 q_scaling_,
44 custom_all_reduce_comm_,
45 enable_custom_all_reduce_);
46
47 dynamic_decode_layer_ = new DynamicDecodeLayer<DynamicDecodeType>(vocab_size_,
48 vocab_size_padded_,
49 0, // end_id, deprecated
50 stream_,
51 cublas_wrapper_,
52 allocator_,
53 is_free_buffer_after_forward_,
54 cuda_device_prop_);
55}
56
57template<typename T>
58void BartDecoding<T>::allocateBuffer()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected