lucataco/wizardcoder-python-34b-v1.0 🔢📝 → 📝
About
Empowering Code Large Language Models with Evol-Instruct

Example Output
"write python code for a simple calculator"
Output
Here's a basic Python code for a simple calculator with addition, subtraction, multiplication and division operations:
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
print("Select operation")
print("1. Addition")
print("2. Subtraction")
print("3. Multiplication")
print("4. Division")
choice = input("Enter choice (1/2/3/4): ")
if choice == '1':
print("Result: ", num1 + num2)
elif choice == '2':
print("Result: ", num1 - num2)
elif choice == '3':
print("Result: ", num1 * num2)
elif choice == '4':
if num2 != 0:
print("Result: ", num1 / num2)
else:
print("Invalid input!")
In this program, we take two numbers as inputs from the user using float()
function to convert them into floating point numbers. Then, we display a menu of available operations and ask the user to choose one.
Based on the user's choice, we perform the corresponding arithmetic operation using conditional statements (if
, elif
and else
). If the user chooses division, we also check whether the second number is not zero to avoid division by zero error.
Finally, we display the result of the selected operation using print()
statement.
Performance Metrics
All Input Parameters
{ "top_p": 0.95, "prompt": "write python code for a simple calculator", "temperature": 0.7, "system_prompt": "Below is an instruction that describes a task. Write a response that appropriately completes the request.", "max_new_tokens": 512, "repetition_penalty": 1.15 }
Input Parameters
- top_p
- When decoding text, samples from the top p percentage of most likely tokens; lower to ignore less likely tokens
- prompt
- Your prompt
- temperature
- Randomness of outputs, 0 is deterministic, greater than 1 is random
- system_prompt
- System prompt that helps guide system behavior
- max_new_tokens
- Number of new tokens
- repetition_penalty
- 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
Version Details
- Version ID
c4798dbaf5104519a74b43dc2574b13012a74714c2c43f555c6ccb9b8e0a6b74
- Version Created
- August 30, 2023