Instructions to use Xcz2568/robustness_t5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Xcz2568/robustness_t5 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="Xcz2568/robustness_t5")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Xcz2568/robustness_t5") model = AutoModelForSeq2SeqLM.from_pretrained("Xcz2568/robustness_t5") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +29 -0
config.json
CHANGED
|
@@ -29,5 +29,34 @@
|
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.38.2",
|
| 31 |
"use_cache": true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
"vocab_size": 50358
|
| 33 |
}
|
|
|
|
| 29 |
"torch_dtype": "float32",
|
| 30 |
"transformers_version": "4.38.2",
|
| 31 |
"use_cache": true,
|
| 32 |
+
"task_specific_params": {
|
| 33 |
+
"summarization": {
|
| 34 |
+
"early_stopping": true,
|
| 35 |
+
"length_penalty": 2.0,
|
| 36 |
+
"max_length": 200,
|
| 37 |
+
"min_length": 30,
|
| 38 |
+
"no_repeat_ngram_size": 3,
|
| 39 |
+
"num_beams": 4,
|
| 40 |
+
"prefix": "summarize: "
|
| 41 |
+
},
|
| 42 |
+
"translation_en_to_de": {
|
| 43 |
+
"early_stopping": true,
|
| 44 |
+
"max_length": 300,
|
| 45 |
+
"num_beams": 4,
|
| 46 |
+
"prefix": "translate English to German: "
|
| 47 |
+
},
|
| 48 |
+
"translation_en_to_fr": {
|
| 49 |
+
"early_stopping": true,
|
| 50 |
+
"max_length": 300,
|
| 51 |
+
"num_beams": 4,
|
| 52 |
+
"prefix": "translate English to French: "
|
| 53 |
+
},
|
| 54 |
+
"translation_en_to_ro": {
|
| 55 |
+
"early_stopping": true,
|
| 56 |
+
"max_length": 300,
|
| 57 |
+
"num_beams": 4,
|
| 58 |
+
"prefix": "translate English to Romanian: "
|
| 59 |
+
}
|
| 60 |
+
},
|
| 61 |
"vocab_size": 50358
|
| 62 |
}
|