Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ Question: <instruction>
|
|
| 19 |
|
| 20 |
Answer: <output>
|
| 21 |
```
|
| 22 |
-
|
| 23 |
|
| 24 |
```python
|
| 25 |
instruction = "Write a function to compute the GCD between two integers a and b"
|
|
@@ -28,4 +28,7 @@ input_ids = tokenizer(prompt, return_tensors="pt")["input_ids"]
|
|
| 28 |
completion = model.generate(input_ids, max_length=200)
|
| 29 |
print(tokenizer.batch_decode(completion[:,input_ids.shape[1]:])[0])
|
| 30 |
```
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
Answer: <output>
|
| 21 |
```
|
| 22 |
+
If you have your model and tokenizer loaded, you can use the following code to make the model generate the right output to a given instruction
|
| 23 |
|
| 24 |
```python
|
| 25 |
instruction = "Write a function to compute the GCD between two integers a and b"
|
|
|
|
| 28 |
completion = model.generate(input_ids, max_length=200)
|
| 29 |
print(tokenizer.batch_decode(completion[:,input_ids.shape[1]:])[0])
|
| 30 |
```
|
| 31 |
+
## More information
|
| 32 |
+
For additional information, check
|
| 33 |
+
- [self-intruct-starcoder](https://huggingface.co/codeparrot/self-instruct-starcoder)
|
| 34 |
+
- [starcoder](https://huggingface.co/bigcode/starcoder)
|