adityasihag
commited on
Commit
•
499995a
1
Parent(s):
6fd4120
Update README.md
Browse files
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 = """
|
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 =
|
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:
|
103 |
```
|
104 |
|
105 |
##### Model Output:
|
106 |
```
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
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:
|