Practical overview
When it fits
Use it when you want implementation guidance for running PolyCoder or related pretrained source-code models, rather than a hosted editor or coding assistant.
Who it is for
- Developers exploring prompt-based code completion or generation with pretrained models.
- Researchers and practitioners setting up source-code model experiments or reproducing the documented evaluation workflows.
Documented uses
- Load a listed PolyCoder checkpoint into a Python workflow using Transformers.
- Generate candidate code continuations from a prompt.
- Retrieve checkpoints for use with the GPT-NeoX toolkit.
- Follow repository instructions for perplexity and HumanEval evaluation.
Requirements & limits
The repository is public and lists an MIT license. The README also identifies PolyCoder checkpoints on Hugging Face and checkpoint files on Zenodo.
- The Transformers example requires version 4.23.0 or later.
- The repository's GPT-NeoX route uses a modified fork to handle tabs and newlines in tokenization.
- The README says model checkpoints require up to 6GB of GPU memory; CPU use is neither tested nor recommended.
- The Hugging Face example and the GPT-NeoX checkpoint workflow are distinct ways to use the models.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Load a PolyCoder checkpoint with Transformers
Set up a Python workflow that loads a listed PolyCoder checkpoint and generates continuations from a code prompt.
Before you start
- Python workflow
- Transformers 4.23.0 or later
- Access to the Hugging Face Hub checkpoint, such as NinedayWang/PolyCoder-2.7B
Steps
Install the documented Transformers version: pip install transformers==4.23.0.
Load the checkpoint tokenizer and causal language model with AutoTokenizer.from_pretrained and AutoModelForCausalLM.from_pretrained.
Encode a code prompt, call model.generate, and decode the returned sequences as shown in the README.
Expected outcome
A Python workflow that produces candidate code continuations from a supplied prompt.
Guide limitations
- The README's example uses PyTorch tensors but does not state hardware requirements for this Hugging Face path.
- Generated continuations are model outputs and may include unrelated or repetitive code.
Prepare a PolyCoder checkpoint for GPT-NeoX
Retrieve and unpack the documented 2.7B, 150K-step checkpoint for use with the repository's GPT-NeoX workflows.
Before you start
- A shell environment with wget and tar
- Sufficient storage for the checkpoint
- GPU memory: the README says checkpoints require up to 6GB to run and does not recommend CPU use
Steps
Create a checkpoints directory and change into it.
Download the documented 2-7B-150K.tar file from Zenodo using the README command.
Unpack the archive with tar -xvf 2-7B-150K.tar.
Expected outcome
An unpacked checkpoint directory for the next documented stage: use with the provided Docker image or the GPT-NeoX fork.
Guide limitations
- This recipe only retrieves and unpacks the checkpoint; it does not run generation.
- The full checkpoint file is not included in the repository and the documented checkpoints range up to 6GB.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- VHellendoorn/Code-LMs · Official homepage title · retained in its source language

