nateraw/codellama-7b-instruct-hf 🔢📝 → 📝

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

Example Output

Output

Here is an example of how you can read in a csv file and calculate the 3 day rolling average of the "profit" column using the "date" column in Python:

import pandas as pd

# Read in the csv file
df = pd.read_csv('your_data.csv')

# Calculate the 3 day rolling average of the "profit" column using the "date" column
df['3_day_rolling_average'] = df['profit'].rolling(window=3).mean()

# Print the results
print(df)

This will give you the 3 day rolling average of the "profit" column for each row in the data frame.

Alternatively, you can also use the rolling_mean function from the pandas library:

df['3_day_rolling_average'] = df.rolling_mean(window=3, column='profit', date_column='date')

This will give you the same result as the previous code.

Performance Metrics

14.91s Prediction Time
16.01s Total Time
All Input Parameters
{
  "top_k": 50,
  "top_p": 0.95,
  "message": "Write a function to load a csv file and find the 3 day rolling average of the \"profit\" column using the \"date\" column.",
  "temperature": 1,
  "max_new_tokens": 1024
}
Input Parameters
top_k Type: integerDefault: 50
The number of highest probability tokens to consider for generating the output. If > 0, only keep the top k tokens with highest probability (top-k filtering).
top_p Type: numberDefault: 1
A probability threshold for generating the output. If < 1.0, only keep the top tokens with cumulative probability >= top_p (nucleus filtering). Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751).
message (required) Type: string
temperature Type: numberDefault: 1
The value used to modulate the next token probabilities.
max_new_tokens Type: integerDefault: 256
The maximum number of tokens the model should generate as output.
Output Schema

Output

Type: arrayItems Type: string

Example Execution Logs
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
Version Details
Version ID
efe614f6aa2d04c1e153dc33e4bc54a3ce97df8f3da7021d15a79233face5c30
Version Created
September 19, 2023
Run on Replicate →