# Closest model available to OpenAI's codex/ GitHub Copilot for code completion

**URL:** <https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224>\
**Category:** 🤗Transformers\
**Created:** [March 1, 2022, 11:17am UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224 "2022-03-01T11:17:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioLopardo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/antoniolopardo/32/2970_2.png) [@AntonioLopardo](https://discuss.huggingface.co/u/AntonioLopardo)\
**Post date:** [March 1, 2022, 11:17am UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/1 "2022-03-01T11:17:18Z")

</div>

Hi everybody,  
I’m trying to work on a replication study of a paper done using OpenAI’s codex model, and I’m looking for the closest model to it available on the model hub. This [NovelAI/genji-python-6B · Hugging Face](https://huggingface.co/NovelAI/genji-python-6B) is the best one I found, but after some testing it seems to often get fixated on code formatting more than the semantics of the program, is the model too small, trained on too little data or is there something better on the model hub?  
I also checked out codeparrot [lvwerra/codeparrot · Hugging Face](https://huggingface.co/lvwerra/codeparrot) but it appears to struggle on longer prompts.  
Should I try with different hyperparameters?  
Thank you for any suggestion!

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](https://discuss.huggingface.co/u/lewtun)\
**Post date:** [March 1, 2022, 3:57pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/2 "2022-03-01T15:57:29Z")

</div>

Pinging @lvwerra who may have some ideas here based on his experience with CodeParrot 🦜 🙂

---

<div class="post-metadata">

**Author:** ![lvwerra](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lvwerra/32/2427_2.png) [@lvwerra](https://discuss.huggingface.co/u/lvwerra)\
**Post date:** [March 1, 2022, 4:13pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/3 "2022-03-01T16:13:43Z")

</div>

You could also try [EleutherAI/gpt-j-6B · Hugging Face](https://huggingface.co/EleutherAI/gpt-j-6B) which was already trained on code and performs pretty well.

For the quality of generations it makes sense to tune the sampling strategy. If the first suggestion by the model should be good then you should go for low temperatures whereas if you have several tries you can increase the temperature to get more variety in the generation.

---

<div class="post-metadata">

**Author:** ![AntonioLopardo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/antoniolopardo/32/2970_2.png) [@AntonioLopardo](https://discuss.huggingface.co/u/AntonioLopardo)\
**Post date:** [March 1, 2022, 5:45pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/4 "2022-03-01T17:45:43Z")

</div>

Thanks for the quick reply!  
I think I didn’t quite understand the value of completed examples/solutions to include in the prompt, adding those improves performance significantly. Do you have any suggestions on literature to better understand sampling strategies/hyperparameters?

Btw I’m getting a build error on the code generation demo of CodeParrot, [CodeParrot Generation - a Hugging Face Space by lvwerra](https://huggingface.co/spaces/lvwerra/codeparrot-generation), it worked fine earlier today though.  
(works now)

---

<div class="post-metadata">

**Author:** ![Surajit](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/surajit/32/3149_2.png) [@Surajit](https://discuss.huggingface.co/u/Surajit)\
**Post date:** [January 30, 2023, 5:34pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/5 "2023-01-30T17:34:56Z")

</div>

You can try out [SantaCoder](https://huggingface.co/spaces/bigcode/santacoder-demo).

---

<div class="post-metadata">

**Author:** ![ONISSUM](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/onissum/32/18345_2.png) [@ONISSUM](https://discuss.huggingface.co/u/ONISSUM)\
**Post date:** [August 7, 2023, 3:45pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/6 "2023-08-07T15:45:57Z")

</div>

Thank you very much for the link, it’s very helpful.

---

<div class="post-metadata">

**Author:** ![ONISSUM](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/onissum/32/18345_2.png) [@ONISSUM](https://discuss.huggingface.co/u/ONISSUM)\
**Post date:** [August 7, 2023, 3:48pm UTC](https://discuss.huggingface.co/t/closest-model-available-to-openais-codex-github-copilot-for-code-completion/15224/7 "2023-08-07T15:48:45Z")

</div>

Ciao Antonio  
scusa se mi permetto di contattarti ma visto la mia poca esperienza qui e visto che sei italiano anche tu mi chiedevo se fai già parte di qualche gruppo o potresti consigliarmene uno tu. Sono autodidatta in programmazione e mi piacerebbe poter imparare da qualcuno che ne sa piu di me. Per cui per ora buon lavoro e un saluto.  
luca
