Instructions to use IDEA-CCNL/Erlangshen-MegatronBert-1.3B-NLI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IDEA-CCNL/Erlangshen-MegatronBert-1.3B-NLI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="IDEA-CCNL/Erlangshen-MegatronBert-1.3B-NLI")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("IDEA-CCNL/Erlangshen-MegatronBert-1.3B-NLI") model = AutoModelForSequenceClassification.from_pretrained("IDEA-CCNL/Erlangshen-MegatronBert-1.3B-NLI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| {"architectures": [ | |
| "MegatronBertForSequenceClassification" | |
| ], | |
| "_num_labels": 3, | |
| "id2label": { | |
| "0": "CONTRADICTION", | |
| "1": "NEUTRAL", | |
| "2": "ENTAILMENT" | |
| }, | |
| "vocab_size": 21248, | |
| "hidden_size": 2048, | |
| "num_hidden_layers": 24, | |
| "num_attention_heads": 8, | |
| "hidden_act": "gelu_new", | |
| "intermediate_size": 8192, | |
| "hidden_dropout_prob": 0.1, | |
| "attention_probs_dropout_prob": 0.1, | |
| "max_position_embeddings": 512, | |
| "type_vocab_size": 2, | |
| "initializer_range": 0.02, | |
| "layer_norm_eps": 1e-12, | |
| "gradient_checkpointing": false, | |
| "position_embedding_type": "absolute", | |
| "use_cache": false, | |
| "transformers_version": "4.20.0", | |
| "model_type": "megatron-bert"} | |