rhamnett/wizardcoder-34b-v1.0 🔢📝 → 📝

▶️ 2.5K runs 📅 Aug 2023 ⚙️ Cog 0.8.6
code-generation text-generation

About

Recently, this variant of Code Llama called WizardCoder 34B has emerged and achieved better scores than GPT4 on Human Eval

Example Output

Prompt:

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

Output

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

For example, the Euclidean distance between (0, 1) and (3, 4) is:

sqrt((x2 - x1)^2 + (y2 - y1)^2) = sqrt(9 + 0) = 3

Here's a possible implementation in JavaScript:

function euclideanDistance(coord1, coord2) {
  if (coord1.length !== coord2.length) {
    throw new Error('Coordinates have different dimensions');
  }
  
  const diff = coord2.map((val, index) => val - coord1[index]);
  const squareSum = diff.reduce((sum, val) => sum + val * val, 0);
  return Math.sqrt(squareSum);
}

This function takes two arrays coord1 and coord2, representing the two coordinates to compute the distance from. It first checks that both coordinates have the same number of dimensions by comparing their lengths. Then it computes the difference between the corresponding values of each coordinate

Performance Metrics

159.43s Prediction Time
159.39s Total Time
All Input Parameters
{
  "n": 1,
  "top_p": 1,
  "prompt": "Write a javascript function that calculates euclidean distance between two coordinates of any dimension",
  "max_length": 256,
  "temperature": 0.75,
  "repetition_penalty": 1.1
}
Input Parameters
n Type: integerDefault: 1Range: 1 - 5
Number of output sequences to generate
top_p Type: numberDefault: 1Range: 0.01 - 1
When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens
prompt (required) Type: string
Text prompt to send to the model.
max_length Type: integerDefault: 256Range: 1 - ∞
Maximum number of tokens to generate. A word is generally 2-3 tokens
temperature Type: numberDefault: 0.75Range: 0.01 - 5
Adjusts randomness of outputs, greater than 1 is random and 0 is deterministic, 0.75 is a good starting value.
repetition_penalty Type: numberDefault: 1.1Range: 0.01 - 5
Penalty for repeated words in generated text; 1 is no penalty, values greater than 1 discourage repetition, less than 1 encourage it.
Output Schema

Output

Type: arrayItems Type: string

Version Details
Version ID
bae902bd8a4032fcf2295523b38da90aae7cc8ca2260e7ca9b8434a981d32278
Version Created
August 29, 2023
Run on Replicate →