Jayveersinh-Raj commited on
Commit
f2e835f
1 Parent(s): 6cefe52

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -47
README.md CHANGED
@@ -1,54 +1,34 @@
1
  ---
2
  license: apache-2.0
3
- base_model: Jayveersinh-Raj/mpt5s-guj-grammar-2
4
- tags:
5
- - generated_from_keras_callback
6
- model-index:
7
- - name: Jayveersinh-Raj/mpt5s-guj-grammar-2-3
8
- results: []
9
  ---
10
 
11
  <!-- This model card has been generated automatically according to the information Keras had access to. You should
12
  probably proofread and complete it, then remove this comment. -->
13
 
14
- # Jayveersinh-Raj/mpt5s-guj-grammar-2-3
15
-
16
- This model is a fine-tuned version of [Jayveersinh-Raj/mpt5s-guj-grammar-2](https://huggingface.co/Jayveersinh-Raj/mpt5s-guj-grammar-2) on an unknown dataset.
17
- It achieves the following results on the evaluation set:
18
- - Train Loss: 0.0777
19
- - Validation Loss: 0.0375
20
- - Epoch: 0
21
-
22
- ## Model description
23
-
24
- More information needed
25
-
26
- ## Intended uses & limitations
27
-
28
- More information needed
29
-
30
- ## Training and evaluation data
31
-
32
- More information needed
33
-
34
- ## Training procedure
35
-
36
- ### Training hyperparameters
37
-
38
- The following hyperparameters were used during training:
39
- - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'class_name': 'WarmUp', 'config': {'initial_learning_rate': 5.6e-05, 'decay_schedule_fn': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5.6e-05, 'decay_steps': 197899, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, '__passive_serialization__': True}, 'warmup_steps': 100, 'power': 1.0, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
40
- - training_precision: mixed_float16
41
-
42
- ### Training results
43
-
44
- | Train Loss | Validation Loss | Epoch |
45
- |:----------:|:---------------:|:-----:|
46
- | 0.0777 | 0.0375 | 0 |
47
-
48
-
49
- ### Framework versions
50
-
51
- - Transformers 4.32.1
52
- - TensorFlow 2.12.0
53
- - Datasets 2.14.4
54
- - Tokenizers 0.13.3
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - gu
 
 
 
 
5
  ---
6
 
7
  <!-- This model card has been generated automatically according to the information Keras had access to. You should
8
  probably proofread and complete it, then remove this comment. -->
9
 
10
+ # Model description
11
+ The model is a mt5-small version of Gujarati Grammarly for spell correction given a sentence. Only this small version checkpoints are open source.
12
+
13
+ # Example usage:
14
+ from transformers import AutoTokenizer
15
+ import tensorflow as tf
16
+ from transformers import TFAutoModelForSeq2SeqLM
17
+ from transformers import create_optimizer
18
+
19
+ model_checkpoint = "Jayveersinh-Raj/guj-grammar-small"
20
+ tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
21
+ model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
22
+
23
+ sent="સુંદરકાંડના પ્રારંભમાં હનૂમાન બળવાન તો છે પણ સાથે-સાથે બુદ્ધિમાન પણ છે તેની રોચક ધર્મકથા છૈ"
24
+ inputs = tokenizer.encode(sent, return_tensors='tf')
25
+ output_ids = model.generate(inputs, max_length=128, num_beams = 4, early_stopping=True)
26
+ output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
27
+
28
+ print("Generated Correction:")
29
+ print(output)
30
+
31
+ # Notes:
32
+ - Only supports Gujarati language for now
33
+ - Private dataset is used
34
+ - Only Tensorflow model is available for now, Pytorch checkpoints would be available soon.