meta/codellama-7b-instruct 🔢📝 → 📝

▶️ 69.0K runs 📅 Aug 2023 ⚙️ Cog 0.9.0-beta11 🔗 GitHub 📄 Paper ⚖️ License
code-generation text-generation

About

A 7 billion parameter Llama tuned for coding and conversation

Example Output

Prompt:

"Write a javascript function that calculates euclidean distance between two coordinates of any dimension"

Output

Here is an example of how you could define such a function in JavaScript:
function computeEuclideanDistance(coord1, coord2) {
// Get the dimensions of both coordinate arrays
var dim1 = coord1.length;
var dim2 = coord2.length;
// Initialize the sum of squared differences
var sumOfSquaredDifferences = 0;
// Iterate over each element in both coordinate arrays and calculate the difference and square it to get the squared difference and then add up all these squared differences to get the total sum of squared differences.
for ( var i = 0; i < Math.min(dim1, dim2)); i++) {
sumOfSquaredDifferences += Math.pow((coord1[i]) - ((coord2[i]))), 2);
}

return Math.sqrt(sumOfSquaredDifferences)), dim1 + dim2));
}

Performance Metrics

2.66s Prediction Time
3.72s Total Time
All Input Parameters
{
  "debug": false,
  "top_k": 250,
  "top_p": 0.95,
  "prompt": "Write a javascript function that calculates euclidean distance between two coordinates of any dimension",
  "temperature": 0.95,
  "max_new_tokens": 500,
  "min_new_tokens": -1,
  "repetition_penalty": 1.15,
  "repetition_penalty_sustain": 256,
  "token_repetition_penalty_decay": 128
}
Input Parameters
top_k Type: integerDefault: 10
Top K
top_p Type: numberDefault: 0.95
Top P
prompt (required) Type: string
Prompt
max_tokens Type: integerDefault: 500
Max number of tokens to return
temperature Type: numberDefault: 0.8
Temperature
system_prompt Type: stringDefault:
System prompt to send to CodeLlama. This is prepended to the prompt and helps guide system behavior.
repeat_penalty Type: numberDefault: 1.1Range: 0 - 2
Repetition penalty
presence_penalty Type: numberDefault: 0Range: 0 - 2
Presence penalty
frequency_penalty Type: numberDefault: 0Range: 0 - 2
Frequency penalty
Output Schema

Output

Type: arrayItems Type: string

Example Execution Logs
Prompt:
[INST] <<SYS>>
<</SYS>>
Write a javascript function that calculates euclidean distance between two coordinates of any dimension [/INST]
** Speed: 78.34 tokens/second
Version Details
Version ID
aac3ab196f8a75729aab9368cd45ea6ad3fc793b6cda93b1ded17299df369332
Version Created
January 8, 2024
Run on Replicate →