adityasihag commited on
Commit
499995a
1 Parent(s): 6fd4120

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -8
README.md CHANGED
@@ -85,12 +85,12 @@ model = PeftModel.from_pretrained(model, "adityasihag/math_QA-gemma-2B-QLoRA-ada
85
  model = model.merge_and_unload()
86
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
87
  tokenizer.pad_token = tokenizer.eos_token
88
- question = """Solve the linear equations. $3(x+2)-x=x + 9$. Find the value of x."""
89
  sample_input = f"""Question: {question} \n Answer: """
90
  sample_input_tokenised = tokenizer(sample_input, return_tensors = "pt").to("cuda")
91
  generated_ids = model.generate(
92
  **sample_input_tokenised,
93
- max_new_tokens = 1024,
94
  temperature = 0.3
95
  )
96
  output = tokenizer.decode(generated_ids[0], skip_special_tokens = True)
@@ -99,16 +99,19 @@ print(output)
99
 
100
  ##### Sample Input:
101
  ```
102
- Question: Solve the linear equations. $3(x+2)-x=x + 9$. Find the value of x. \n Answer:
103
  ```
104
 
105
  ##### Model Output:
106
  ```
107
- Given the linear equation 3(x+2)-x=x+9.
108
- First, distribute the 3 in the brackets to get 3x + 6 - x = x + 9.
109
- Simplify the equation to get 2x + 6 = x + 9.
110
- Next, transpose x from the right side to the left side and from the left side to the right side to get x = 9 - 6.
111
- Finally, solve for x to get x = 3.
 
 
 
112
  ```
113
 
114
  #### Prompt Template:
 
85
  model = model.merge_and_unload()
86
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
87
  tokenizer.pad_token = tokenizer.eos_token
88
+ question = """Gretchen has 110 coins. There are 30 more gold coins than silver coins. How many gold coins does Gretchen have?"""
89
  sample_input = f"""Question: {question} \n Answer: """
90
  sample_input_tokenised = tokenizer(sample_input, return_tensors = "pt").to("cuda")
91
  generated_ids = model.generate(
92
  **sample_input_tokenised,
93
+ max_new_tokens = 512,
94
  temperature = 0.3
95
  )
96
  output = tokenizer.decode(generated_ids[0], skip_special_tokens = True)
 
99
 
100
  ##### Sample Input:
101
  ```
102
+ Question: Gretchen has 110 coins. There are 30 more gold coins than silver coins. How many gold coins does Gretchen have? \n Answer:
103
  ```
104
 
105
  ##### Model Output:
106
  ```
107
+ Let's assume the number of silver coins is x.
108
+ Since there are 30 more gold coins than silver coins, the number of gold coins is x + 30.
109
+ The total number of coins is x + (x + 30) = 110.
110
+ Combining like terms, we get 2x + 30 = 110.
111
+ Subtracting 30 from both sides, we get 2x = 80.
112
+ Dividing both sides by 2, we get x = 40.
113
+ So, Gretchen has 40 silver coins and 40 + 30 = 70 gold coins.
114
+ The answer is: 70
115
  ```
116
 
117
  #### Prompt Template: