Update README.md
Browse files
README.md
CHANGED
|
@@ -23,10 +23,25 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
|
|
| 23 |
```python
|
| 24 |
from transformers import pipeline
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
| 32 |
## Training procedure
|
|
|
|
| 23 |
```python
|
| 24 |
from transformers import pipeline
|
| 25 |
|
| 26 |
+
pipe = pipeline(
|
| 27 |
+
"text-generation",
|
| 28 |
+
model="mzen/EventModel-1.2B",
|
| 29 |
+
trust_remote_code=True,
|
| 30 |
+
device_map="auto"
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
prompt = "### Character: 13 year old, boy\n\n### Problem:"
|
| 34 |
+
|
| 35 |
+
output = pipe(
|
| 36 |
+
prompt,
|
| 37 |
+
max_new_tokens=512,
|
| 38 |
+
do_sample=True,
|
| 39 |
+
temperature=0.7,
|
| 40 |
+
top_p=0.9,
|
| 41 |
+
return_full_text=False
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
print(output[0]['generated_text'])
|
| 45 |
```
|
| 46 |
|
| 47 |
## Training procedure
|