Skip to content

Investigate top-p performance #963

@mattdangerw

Description

@mattdangerw

Currently our top-p (nucleus) sampler has the worst performance of our entire sampling offering, likely because of the sort operation we need to do for our softmax probabilities. See these rough numbers for example, where top-p is slower than beam, despite needing much less computation on the model itself.

We should see if there is anything we can do to speed up top-p sampling with XLA (e.g. a more XLA friendly sort op).

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions