dennispark
commited on
Commit
β’
d0717e5
1
Parent(s):
ae6a6c0
Update README.md
Browse files
README.md
CHANGED
@@ -23,9 +23,9 @@ from transformers import T5TokenizerFast, T5ForConditionalGeneration
|
|
23 |
tokenizer = T5TokenizerFast.from_pretrained('paust/pko-t5-base')
|
24 |
model = T5ForConditionalGeneration.from_pretrained('paust/pko-t5-base')
|
25 |
|
26 |
-
input_ids = tokenizer(["
|
27 |
labels = tokenizer(["T5 μ
λλ€."]).input_ids
|
28 |
-
outputs = model(input_ids, labels)
|
29 |
|
30 |
print(f"loss={outputs.loss} logits={outputs.logits}")
|
31 |
```
|
|
|
23 |
tokenizer = T5TokenizerFast.from_pretrained('paust/pko-t5-base')
|
24 |
model = T5ForConditionalGeneration.from_pretrained('paust/pko-t5-base')
|
25 |
|
26 |
+
input_ids = tokenizer(["qa question: λΉμ μ μ΄λ¦μ 무μμΈκ°μ?"]).input_ids
|
27 |
labels = tokenizer(["T5 μ
λλ€."]).input_ids
|
28 |
+
outputs = model(input_ids=input_ids, labels=labels)
|
29 |
|
30 |
print(f"loss={outputs.loss} logits={outputs.logits}")
|
31 |
```
|