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

Method forward

examples/pytorch/bart/utils/ft_decoding.py:306–318  ·  view source on GitHub ↗
(self, beam_width, max_seq_len, top_k, top_p,
                beam_search_diversity_rate, temperature,
                len_penalty, repetition_penalty, random_seed,
                mem_hidden_states, mem_seq_len,
                is_return_output_log_probs, is_return_cum_log_probs, is_return_cross_attentions=False)

Source from the content-addressed store, hash-verified

304 position_embedding_type, activation_type, layernorm_type, *decoding_weight_list)
305
306 def forward(self, beam_width, max_seq_len, top_k, top_p,
307 beam_search_diversity_rate, temperature,
308 len_penalty, repetition_penalty, random_seed,
309 mem_hidden_states, mem_seq_len,
310 is_return_output_log_probs, is_return_cum_log_probs, is_return_cross_attentions=False):
311 # TODO (bhsueh) Not found an method to put a None Type into op forward function
312 # So, the top_k and top_p must be some values now.
313 results = self.decoding.forward(beam_width, max_seq_len,
314 top_k, top_p, beam_search_diversity_rate,
315 temperature, len_penalty, repetition_penalty,
316 random_seed, mem_hidden_states, mem_seq_len,
317 is_return_output_log_probs, is_return_cum_log_probs, is_return_cross_attentions)
318 return results
319
320
321class FTBart(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected