Skip to content

Conversation

@guoshengCS
Copy link
Contributor

PR types

New features

PR changes

Others

Description

Add the first draft for integrating FT into generation api.

@guoshengCS guoshengCS changed the title Add the first draft for integrating FT into generation api. Integrating FT into generation api Oct 12, 2021
@guoshengCS guoshengCS changed the title Integrating FT into generation api Integrate FT into generation api Oct 12, 2021
@guoshengCS guoshengCS marked this pull request as ready for review October 27, 2021 12:57
@guoshengCS guoshengCS requested a review from smallv0221 October 27, 2021 13:01
Copy link
Contributor

@smallv0221 smallv0221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

# TODO(guosheng): Currently, beam_search_v2 in FasterTransformer uses
# t2t beam search which has some difference with beam search in generation
# api on finish queue addition and early-stop criterion, and it seems
# lead to poor performance on bart cnn-sum model, thus we disable it temporarily.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是之后会把加速版的的beam_search改成hf的么,应该不用禁掉beam_search吧

return False
# Some checks on kwargs. For example, FasterBART needs `mem_seq_lens` as
# one input while BART not, thus check whether `mem_seq_lens` in kwargs.
if model_kwargs.get('mem_seq_lens', None) is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mem_seq_lens的获取可以移到FasterBart中,保证generate接受的参数统一

@smallv0221 smallv0221 merged commit 20acd16 into PaddlePaddle:develop Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants