# Top K? How can I set it?

**URL:** <https://community.openai.com/t/top-k-how-can-i-set-it/3712>\
**Category:** API\
**Created:** [June 2, 2021, 1:39am UTC](https://community.openai.com/t/top-k-how-can-i-set-it/3712 "2021-06-02T01:39:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugenelim](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/eugenelim/32/2007_2.png) [@eugenelim](https://community.openai.com/u/eugenelim)\
**Post date:** [June 2, 2021, 1:39am UTC](https://community.openai.com/t/top-k-how-can-i-set-it/3712/1 "2021-06-02T01:39:54Z")

</div>

I understand that the API allows us to specify for Top P, but how about Top K? Is there a default Top K that is already implemented? Or can we change Top K by deriving it from Top P?

---

<div class="post-metadata">

**Author:** ![joey](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/joey/32/41_2.png) [@joey](https://community.openai.com/u/joey)\
**Post date:** [June 2, 2021, 6:30am UTC](https://community.openai.com/t/top-k-how-can-i-set-it/3712/2 "2021-06-02T06:30:32Z")

</div>

There’s no top\_k parameter at this time, but I’d love to know why you’d want to use Top K.

---

<div class="post-metadata">

**Author:** ![eugenelim](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/eugenelim/32/2007_2.png) [@eugenelim](https://community.openai.com/u/eugenelim)\
**Post date:** [June 2, 2021, 7:19am UTC](https://community.openai.com/t/top-k-how-can-i-set-it/3712/4 "2021-06-02T07:19:51Z")

</div>

Hi Joey! I was hoping to recreate the methods described in [the GPT-2 Release Strategies report](https://d4mucfpksywv.cloudfront.net/papers/GPT_2_Report.pdf) to detect GPT-3 generations. This is to help detect potential misuses of GPT-3. The method described in the report used Top-K as a restriction in order to train their discriminator. Thank you.

---

<div class="post-metadata">

**Author:** ![joey](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/joey/32/41_2.png) [@joey](https://community.openai.com/u/joey)\
**Post date:** [June 2, 2021, 11:18am UTC](https://community.openai.com/t/top-k-how-can-i-set-it/3712/5 "2021-06-02T11:18:39Z")

</div>

Interesting! I’m not sure of any way to use top\_k here.
