meta / codellama-7b-python

A 7 billion parameter Llama tuned for coding with Python

  • Public
  • 3.9K runs
  • L40S
  • GitHub
  • Paper
  • License
Iterate in playground

Input

*string
Shift + Return to add a new line

Prompt to send to CodeLlama.

integer
(minimum: 1)

Maximum number of tokens to generate. A word is generally 2-3 tokens

Default: 128

number
(minimum: 0.01, maximum: 5)

Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic, 0.75 is a good starting value.

Default: 0.75

number
(minimum: 0, maximum: 1)

When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens

Default: 0.9

integer
(minimum: 0)

When decoding text, samples from the top k most likely tokens; lower to ignore less likely tokens

Default: 50

string
Shift + Return to add a new line

A comma-separated list of sequences to stop generation at. For example, '<end>,<stop>' will stop generation at the first instance of 'end' or '<stop>'.

boolean

provide debugging output in logs

Default: false

Output

1(): return 2 + 4 def s2(x, y): return x + y def s3(x, y): return x + y a = s1()
Generated in

Run time and cost

This model costs approximately $0.022 to run on Replicate, or 45 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 23 seconds. The predict time for this model varies significantly based on the inputs.

Readme

CodeLlama is a family of fine-tuned Llama 2 models for coding. This is CodeLlama-7b-python, a 7 billion parameter Llama model tuned for writing Python.