vccarvalho11 commited on
Commit
27c9beb
·
verified ·
1 Parent(s): a1eccde

Upload coedit-large ONNX model

Browse files
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: onnx
3
+ tags:
4
+ - text2text-generation
5
+ - t5
6
+ - coedit
7
+ - grammar-correction
8
+ - encoder-decoder
9
+ - onnx
10
+ - inference4j
11
+ license: apache-2.0
12
+ pipeline_tag: text2text-generation
13
+ ---
14
+
15
+ # CoEdIT Large — ONNX
16
+
17
+ ONNX export of [CoEdIT Large](https://huggingface.co/grammarly/coedit-large) (780M parameters) with encoder-decoder architecture and KV cache support.
18
+
19
+ CoEdIT is a T5-based model fine-tuned for text editing tasks including grammar correction, simplification, coherence, and paraphrasing.
20
+
21
+ Converted for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java.
22
+
23
+ ## Original Source
24
+
25
+ - **Repository:** [grammarly/coedit-large](https://huggingface.co/grammarly/coedit-large)
26
+ - **License:** Apache 2.0
27
+
28
+ ## Usage with inference4j
29
+
30
+ ```java
31
+ try (var corrector = CoeditGrammarCorrector.coeditLarge().build()) {
32
+ System.out.println(corrector.correct("She don't likes swimming."));
33
+ // She doesn't like swimming.
34
+ }
35
+ ```
36
+
37
+ ## Model Details
38
+
39
+ | Property | Value |
40
+ |----------|-------|
41
+ | Architecture | T5 encoder-decoder (780M parameters) |
42
+ | Task | Grammar correction, text editing |
43
+ | Tokenizer | SentencePiece (32,128 tokens) |
44
+ | Original framework | PyTorch (transformers) |
45
+ | Export method | Hugging Face Optimum (encoder-decoder with KV cache) |
46
+
47
+ ## License
48
+
49
+ This model is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Original model by [Grammarly](https://huggingface.co/grammarly).
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "T5ForConditionalGeneration"
4
+ ],
5
+ "classifier_dropout": 0.0,
6
+ "d_ff": 2816,
7
+ "d_kv": 64,
8
+ "d_model": 1024,
9
+ "decoder_start_token_id": 0,
10
+ "dense_act_fn": "gelu_new",
11
+ "dropout_rate": 0.1,
12
+ "dtype": "float32",
13
+ "eos_token_id": 1,
14
+ "feed_forward_proj": "gated-gelu",
15
+ "initializer_factor": 1.0,
16
+ "is_encoder_decoder": true,
17
+ "is_gated_act": true,
18
+ "layer_norm_epsilon": 1e-06,
19
+ "model_type": "t5",
20
+ "n_positions": 512,
21
+ "num_decoder_layers": 24,
22
+ "num_heads": 16,
23
+ "num_layers": 24,
24
+ "output_past": true,
25
+ "pad_token_id": 0,
26
+ "relative_attention_max_distance": 128,
27
+ "relative_attention_num_buckets": 32,
28
+ "tie_word_embeddings": false,
29
+ "transformers_version": "4.57.6",
30
+ "use_cache": true,
31
+ "vocab_size": 32100
32
+ }
decoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88eca8ec7b6851307bc1f529aef4d91d16628594a905a80d90f676868441dda0
3
+ size 1899772475
decoder_with_past_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de52f72025365f7b20fff956a6aba0739c758596f46d4096e3ad22c7fdaf031f
3
+ size 1698374979
encoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f85005973bab0025145b4f74500614b23725c0dc986a2c359da10f6012f707a
3
+ size 1365181498
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff