Code Llama 70B Instruct

CodeAvailable
by MetaModel ID: codellama-70b-instruct

Meta's largest Code Llama, a 70B Llama-2 derivative specialized for programming and tuned to follow instructions in chat form. Handles code generation, completion, and explanation across common languages. Served on Replicate as a per-call endpoint.

Price
β‰ˆ $0.0504/run
Context
16,384 tokens
Max. output
4,096 tokens
Input β†’ output
Text β†’ Text
Developer
Meta
Updated
September 23, 2026
01

Playground

Try Code Llama 70B Instruct

Input & output

β‰ˆ $0.0504/run
Try Code Llama 70B Instruct

Coding prompt

Advanced settings (3)

Optional system instruction

Output
The answer appears here.

This run

about $0.0504 Β· 5.04 credits

$0.1512 (15.12 credits) are reserved at the start; the actual GPU time is billed.

For accounts without a purchase: runs above 2 credits need a top-up.

New here?

10 free credits ($0.10) when you sign up with Google

Usable 24 hours after sign-up, up to 5 runs per day and at most 2 credits per run. Other sign-in methods start without credits.

02

Examples

Real outputs from the public examples of this model on Replicate, with the prompt and settings that produced them. They were not generated live on this page.
  • Prompt

    In Bash, how do I list all text files in the current directory (excluding subdirectories) that have been modified in the last month?

    Response

    πŸ“‚ To list all text files (.txt extension) in the current directory (excluding subdirectories) that have been modified in the last month, you can use a combination of `find` and `ls`: ```bash ls -1t $(find . -type f -name "*.txt" -mtime -30d | sort) ``` πŸ”§ Here's how it works: * `find . -type f -name "*.txt"`: Finds all text files in the current directory (excluding subdirectories). `-type f` means regular file. `-name "*.txt"` means files with a `.txt` extension. * `-mtime -30d`: Specifies that we're interested only in those text files that have been modified within the last 30 days. The `find` command accepts a range, so `-30d` is interpreted as "less than or equal to 30 days". * `$( )` : Captures the output of the `find` command and uses it as an input for the `ls -1t` command. * `ls -1t`: Lists files in a single column (`-1`) sorted by modification time (`-t`). The result will be a list of text files, sorted with the most recently modified first. This approach relies on `find` to search and filter for relevant files based on criteria like file type, name, and modification date. Then, it passes those results through `sort` before feeding them to `ls -1t`, which displays the list of files in a single column sorted by their modification time (newest first). **Note:** If you're using MacOS or Linux with GNU findutils installed, you can use `-mtime +30d` instead of `-mtime -30d`. This is because on these platforms, the meaning of `-30d` is "more than 30 days". Source: assi…

  • Prompt

    Write a function that computes the set of sums of all contiguous sublists of a given list.

    Response

    ```javascript function sumSubLists(arr) { let result = []; for (let i = 0; i < arr.length; i++) { let currentSum = 0; for (let j = i; j < arr.length; j++) { currentSum += arr[j]; result.push(currentSum); } } return result; } ``` The `sumSubLists` function takes an array as input and returns an array containing the sums of all contiguous sublists. It iterates over each element in the original list, starting with the first element at index 0. For each element, it calculates the sum of all elements starting from that point until the end of the list. This is done by initializing a variable `currentSum` to zero and then adding each successive element to it as it iterates through the remainder of the sublist. The function pushes each calculated sum into an array called `result`, which is returned at the end. Source: assistant

    Settings

    system_prompt: Provide answers in JavaScript.

  • Prompt

    What is the difference between inorder and preorder traversal? Give an example in Python.

    Response

    😊 In-order traversal visits nodes in order of left, root, right whereas Pre-order traversal visits nodes in order of root, left, right. Here is the code to demonstrate this with an example: ```python def inOrder(root): if root != None: inOrder(root.left) print(root.val, end=" ") inOrder(root.right) def preOrder(root): if root != None: print(root.val, end=" ") preOrder(root.left) preOrder(root.right) ``` This is a simple example of an in-order and pre-order traversal. The `inOrder` function will print the values of nodes by first visiting the left child, then printing the current node value, and finally recursively calling itself for the right child. The `preOrder` function will start with the root node, then visit its children in order. Source: assistant

03

About Code Llama 70B Instruct

TL;DRAs of September 23, 2026

Code Llama 70B Instruct is a model by Meta in the Code category. On Railwail, Code Llama 70B Instruct costs β‰ˆ $0.0504 per run. The context window holds 16,384 tokens, and one response can be up to 4,096 tokens long.

Code Llama 70B Instruct is the top tier of Meta's Code Llama family. It is fine-tuned for safer, instruction-following code chat and was competitive with proprietary models at release. Useful for generating functions, explaining snippets, and translating between languages.
04

Pricing

Prices in US dollars. Usage is charged from prepaid credits.
Typical run (β‰ˆ 30 s on A100 (80GB))$0.0504 per run
GPU time (A100 (80GB))$0.00168 per GPU second
  • Billed by the GPU time the run actually takes. When the run starts, 3Γ— the typical price is reserved from your balance and settled afterwards.
  • 1 credit = $0.01

Cost calculator

Price calculator

s

Typical according to the provider: about 30 s

Total

$5.04

504 credits

Per run

$0.0504 Β· 5.04 credits

Billed by the actual GPU time; this is an estimate.

05

API

Call Code Llama 70B Instruct with your Railwail API key. Use this model ID in the request:
codellama-70b-instructAPI documentationGet an API key

No verified API example

The public API passes a different input format than this model needs. Use the playground above.

06

Specifications

Model ID
codellama-70b-instruct
Developer
Meta
Category
Code
Input
Text
Output
Text
Context window
16,384 tokens
Max. output
4,096 tokens
Billing
By usage (tokens or GPU time)
Catalog entry updated
September 23, 2026

Input parameters

Inputs and settings from the model's input schema. The example in the API section shows which of them the API accepts.

  • promptrequired

    Coding prompt

    Type: Text
    Default: –
    Allowed values: –
  • max_tokens
    Type: Integer
    Default: 1024
    Allowed values: 1 to 4,096
  • temperature
    Type: Number
    Default: 0.2
    Allowed values: 0 to 2
  • system_prompt

    Optional system instruction

    Type: Text
    Default: –
    Allowed values: –

Tags

  • meta
  • code-llama
  • coding
  • instruct
  • open-weights
  • replicate
07

Use cases

08

Frequently asked questions

What is Code Llama 70B Instruct?

Code Llama 70B Instruct is a model by Meta in the Code category.

How much does Code Llama 70B Instruct cost on Railwail?

On Railwail, Code Llama 70B Instruct costs β‰ˆ $0.0504 per run. You are charged for what each request actually uses. Usage is paid from prepaid credits; 1 credit equals $0.01.

What is the context window of Code Llama 70B Instruct?

The context window of Code Llama 70B Instruct holds 16,384 tokens. One response can be up to 4,096 tokens long.

How fast is Code Llama 70B Instruct?

There are not enough measured runs of Code Llama 70B Instruct on Railwail yet to state a run time. It depends on the input, the settings and the load at the provider.

Is Code Llama 70B Instruct better than Code Llama 13B Instruct?

That depends on the task. Code Llama 70B Instruct (Meta) and Code Llama 13B Instruct (Meta) are both models in the Code category. The comparison page shows their prices and specifications side by side.

Compare Code Llama 70B Instruct and Code Llama 13B Instruct
09

Comparable models

All in this category

All models through one API

One API key for every model on Railwail. Usage is charged from prepaid credits, 1 credit = $0.01.