WelfCrozzo commited on
Commit
65772b6
·
1 Parent(s): b14c801

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -4
README.md CHANGED
@@ -28,9 +28,9 @@ widget:
28
 
29
  # T5 for belarusian language
30
 
31
- This model is based on T5-small with sequence length equal 128 tokens.
32
 
33
- Supported tasks:
34
  - translation BE to RU: `<extra_id_1>`
35
  - translation BE to EN: `<extra_id_2>`
36
  - translation RU to BE: `<extra_id_3>`
@@ -38,7 +38,25 @@ Supported tasks:
38
  - translation EN to BE: `<extra_id_6>`
39
  - translation EN to RU: `<extra_id_7>`
40
 
41
- Metrics:
42
  - [evel/BLEU](https://api.wandb.ai/links/miklgr500/31mq4s36)
43
  - [evel/loss](https://api.wandb.ai/links/miklgr500/rvi2p69n)
44
- - [train/loss](https://api.wandb.ai/links/miklgr500/z9alu3n5)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  # T5 for belarusian language
30
 
31
+ This model is based on T5-small with sequence length equal 128 tokens. Model trained from scratch on RTX 3090 24GB.
32
 
33
+ # Supported tasks:
34
  - translation BE to RU: `<extra_id_1>`
35
  - translation BE to EN: `<extra_id_2>`
36
  - translation RU to BE: `<extra_id_3>`
 
38
  - translation EN to BE: `<extra_id_6>`
39
  - translation EN to RU: `<extra_id_7>`
40
 
41
+ # Metrics:
42
  - [evel/BLEU](https://api.wandb.ai/links/miklgr500/31mq4s36)
43
  - [evel/loss](https://api.wandb.ai/links/miklgr500/rvi2p69n)
44
+ - [train/loss](https://api.wandb.ai/links/miklgr500/z9alu3n5)
45
+
46
+ # How to Get Started with the Model
47
+
48
+ <details>
49
+ <summary> Click to expand </summary>
50
+
51
+ ```python
52
+ from transformers import T5TokenizerFast, T5ForConditionalGeneration
53
+
54
+ tokenizer = T5TokenizerFast.from_pretrained("WelfCrozzo/T5-L128-belarusian")
55
+ model = T5ForConditionalGeneration.from_pretrained("WelfCrozzo/T5-L128-belarusian")
56
+
57
+ x = tokenizer.encode('<extra_id_1>да зорак праз цяжкасці', return_tensors='pt')
58
+
59
+ result = model.generate(x, return_dict_in_generate=True, output_scores=True,max_length=128)
60
+ print(tokenizer.decode(result["sequences"][0]))
61
+ ```
62
+ </details>