WEBINAR | AI Prototype to Production: Operationalizing and Orchestrating AI
September 25, 2023

WizardCoder: Large Language Model for Code

Table of Contents:

Run WizardCoder With An API


WizardCoder is a Code Large Language Model (LLM) that has been fine-tuned on Llama2 and has demonstrated superior performance compared to other open-source and closed LLMs on prominent code generation benchmarks.

You can now try out wizardCoder-15B and wizardCoder-Python-34B in the Clarifai Platform and access it through the API.

Table of Contents

  1. Introduction
  2. Evol-Instruct
  3. Prompt Format
  4. Running WizardCoder with Python
  5. Best Use Cases
  6. Evaluation


The world of coding has been revolutionized by the advent of large language models (LLMs) like GPT-4, StarCoder, and Code LLama. WizardCoder is taking things to a whole new level. WizardCoder is a specialized model that has been fine-tuned to follow complex coding instructions. It leverages the Evol-Instruct method to adapt to coding tasks, making it a powerful tool for developers.


Evol-Instruct is an evolutionary algorithm that generates diverse and complex instruction data for Large-scale Language Models (LLMs). It is designed to enhance the performance of LLMs by providing them with high-quality instructions that are difficult to create manually.

Evol-Instruct works by generating a pool of initial instructions(52k instruction dataset of Alpaca), which are then evolved through a series of steps to create more complex and diverse instructions. Once the instruction pool is generated, it is used to fine-tune an LLM, resulting in a new model called WizardCoder. The fine-tuning process involves training the LLM on the instruction data to improve its ability to generate coherent and fluent text in response to various inputs.

Prompt Format

For WizardCoder, the Prompt should be as following:

Running WizardCoder model with Python

You can run the WizardCoder-15 B Model using Clarifai’s Python client.

Check out the Code Below:

You can also run WizardCoder-15 B Model using other Clarifai Client Libraries like Javascript, Java, cURL, NodeJS, PHP, etc here

Model Demo in the Clarifai Platform:

Try out the WizardCoder-15B and WizardCoder-Python-34B models here: and

Best Use Cases

WizardCoder can be used for a variety of code-related tasks, including code generation, code completion, and code summarization. Here are some examples of input prompts that can be used with the model:

  • Code generation: Given a description of a programming task, generate the corresponding code. Example input: “Write a Python function that takes a list of integers as input and returns the sum of all even numbers in the list.”
  • Code completion: Given an incomplete code snippet, complete the code. Example input: “def multiply(a, b): \n return a * b _”
  • Code summarization: Given a long code snippet, generate a summary of the code. Example input: “Write a Python program that reads a CSV file and calculates the average of a specific column.”

The 34B model is not just a coding assistant; it’s a powerhouse capable of:

  1. Automating DevOps Scripts: Generate shell scripts or Python scripts for automating tasks.
  2. Data Analysis: Generate Python code for data preprocessing, analysis, and visualization.
  3. Machine Learning Pipelines: Generate end-to-end ML pipelines, from data collection to model deployment.
  4. Web Scraping: Generate code for web scraping tasks.
  5. API Development: Generate boilerplate code for RESTful APIs.
  6. Blockchain: Generate smart contracts for Ethereum or other blockchain platforms


WizardCoder beats all other open-source Code LLMs, attaining state-of-the-art (SOTA) performance, according to experimental findings from four code-generating benchmarks, including HumanEval, HumanEval+, MBPP, and DS-100.

WizardCoder-Python-34B has demonstrated exceptional performance on code-related tasks. The model has outperformed other open-source and closed LLMs on prominent code generation benchmarks, including HumanEval (73.2%), HumanEval+, and MBPP(61.2%).

WizardCoder-Python-34B-V1.0 attains the second position in HumanEval Benchmarks, surpassing GPT4 (2023/03/15, 73.2 vs. 67.0), ChatGPT-3.5 (73.2 vs. 72.5) and Claude2 (73.2 vs. 71.2).

WizardCoder-15B-v1.0 model achieves the 57.3 pass@1 on the HumanEval Benchmarks, which is 22.3 points higher than the SOTA open-source Code LLMs including StarCoder, CodeGen, CodeGee, and CodeT5+. Additionally, WizardCoder significantly outperforms all the open-source Code LLMs with instructions fine-tuning, including InstructCodeT5+, StarCoder-GPTeacher, and Instruct-Codegen-16B

Keep up to speed with AI

  • Follow us on X to get the latest from the LLMs

  • Join us in our Discord to talk LLMs