dennispark commited on
Commit
d0717e5
β€’
1 Parent(s): ae6a6c0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
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(["nsmc sentence: λ‹Ήμ‹ μ˜ 이름은 λ¬΄μ—‡μΈκ°€μš”?"]).input_ids
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
  ```