girish00 commited on
Commit
f4f91a1
·
verified ·
1 Parent(s): 496fc07

update endpoint helper files

Browse files
Files changed (1) hide show
  1. finetune_coding_llm_colab.py +31 -7
finetune_coding_llm_colab.py CHANGED
@@ -53,13 +53,37 @@ TEMPLATES = [
53
  "output": "if x == 10: print(x)",
54
  "explanation": "Corrected assignment to comparison operator.",
55
  },
56
- {
57
- "instruction": "Explain code",
58
- "input": "for i in range(3): print(i)",
59
- "output": "Prints numbers from 0 to 2.",
60
- "explanation": "Loop iterates from 0 to 2 and prints values.",
61
- },
62
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
 
65
  def format_training_text(template):
 
53
  "output": "if x == 10: print(x)",
54
  "explanation": "Corrected assignment to comparison operator.",
55
  },
56
+ {
57
+ "instruction": "Explain code",
58
+ "input": "for i in range(3): print(i)",
59
+ "output": "Prints numbers from 0 to 2.",
60
+ "explanation": "Loop iterates from 0 to 2 and prints values.",
61
+ },
62
+ {
63
+ "instruction": "Write a Python function",
64
+ "input": "Create a function to multiply two numbers",
65
+ "output": "def multiply(a, b):\n return a * b",
66
+ "explanation": "Defined a multiply function that returns the product of two inputs.",
67
+ },
68
+ {
69
+ "instruction": "Write a Python function",
70
+ "input": "Create a function to add two numbers",
71
+ "output": "def add(a, b):\n return a + b",
72
+ "explanation": "Defined an add function that returns the sum of two inputs.",
73
+ },
74
+ {
75
+ "instruction": "Write a Python function",
76
+ "input": "Create a function to subtract two numbers",
77
+ "output": "def subtract(a, b):\n return a - b",
78
+ "explanation": "Defined a subtract function that returns the difference between two inputs.",
79
+ },
80
+ {
81
+ "instruction": "Write a Python function",
82
+ "input": "Create a function to divide two numbers",
83
+ "output": "def divide(a, b):\n return a / b",
84
+ "explanation": "Defined a divide function that returns the quotient of two inputs.",
85
+ },
86
+ ]
87
 
88
 
89
  def format_training_text(template):