Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
This is the IndicBART model. For detailed documentation look here: https://indicnlp.ai4bharat.org/indic-bart/ and https://github.com/AI4Bharat/indic-bart/
|
2 |
|
3 |
Usage:
|
4 |
-
|
5 |
```
|
6 |
from transformers import MBartForConditionalGeneration, AutoModelForSeq2SeqLM
|
7 |
from transformers import AlbertTokenizer, AutoTokenizer
|
@@ -33,7 +32,7 @@ model_output=model.generate(inp, use_cache=True, num_beams=4, max_length=60, min
|
|
33 |
decoded_output=tokenizer.decode(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
|
34 |
|
35 |
print(decoded_output)
|
36 |
-
|
37 |
Notes:
|
38 |
1. This is compatible with the latest version of transformers but was developed with version 4.3.2 so consider using 4.3.2 if possible.
|
39 |
2. While I have only shown how to let logits and loss and how to generate outputs, you can do pretty much everything the MBartForConditionalGeneration class can do as in https://huggingface.co/docs/transformers/model_doc/mbart#transformers.MBartForConditionalGeneration
|
|
|
1 |
This is the IndicBART model. For detailed documentation look here: https://indicnlp.ai4bharat.org/indic-bart/ and https://github.com/AI4Bharat/indic-bart/
|
2 |
|
3 |
Usage:
|
|
|
4 |
```
|
5 |
from transformers import MBartForConditionalGeneration, AutoModelForSeq2SeqLM
|
6 |
from transformers import AlbertTokenizer, AutoTokenizer
|
|
|
32 |
decoded_output=tokenizer.decode(model_output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
|
33 |
|
34 |
print(decoded_output)
|
35 |
+
```
|
36 |
Notes:
|
37 |
1. This is compatible with the latest version of transformers but was developed with version 4.3.2 so consider using 4.3.2 if possible.
|
38 |
2. While I have only shown how to let logits and loss and how to generate outputs, you can do pretty much everything the MBartForConditionalGeneration class can do as in https://huggingface.co/docs/transformers/model_doc/mbart#transformers.MBartForConditionalGeneration
|