Zero-Shot Classification
Transformers
Safetensors
English
ultrabert
text-classification
natural-language-inference
nli
tasksource
custom_code
Instructions to use tasksource/UltraBERT-150M-nli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tasksource/UltraBERT-150M-nli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="tasksource/UltraBERT-150M-nli", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tasksource/UltraBERT-150M-nli", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("tasksource/UltraBERT-150M-nli", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from tasksource/UltraBERT-150M-nli: direct link, hf CLI and curl.
- Browser
- Download file 5.95 kB
-
https://huggingface.co/tasksource/UltraBERT-150M-nli/resolve/main/config.json
- Command line
-
hf download hf://tasksource/UltraBERT-150M-nli/config.json
-
curl -L -o config.json https://huggingface.co/tasksource/UltraBERT-150M-nli/resolve/main/config.json
5.95 kB
| { | |
| "architectures": [ | |
| "UltrabertForSequenceClassification" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_windows": [ | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null, | |
| 128, | |
| 128, | |
| null | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_ultrabert.UltrabertConfig", | |
| "AutoModel": "modeling_ultrabert.UltrabertModel", | |
| "AutoModelForMaskedLM": "modeling_ultrabert.UltrabertForMaskedLM", | |
| "AutoModelForQuestionAnswering": "modeling_ultrabert.UltrabertForQuestionAnswering", | |
| "AutoModelForSequenceClassification": "modeling_ultrabert.UltrabertForSequenceClassification", | |
| "AutoModelForTokenClassification": "modeling_ultrabert.UltrabertForTokenClassification" | |
| }, | |
| "bos_token_id": 0, | |
| "classifier_dropout": 0.0, | |
| "classifiers_size": [ | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 1, | |
| 2, | |
| 2, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 2, | |
| 2, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 16, | |
| 13, | |
| 100, | |
| 9, | |
| 2, | |
| 3, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 4, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 2, | |
| 3, | |
| 1, | |
| 2, | |
| 2, | |
| 3, | |
| 13, | |
| 2, | |
| 3, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 4, | |
| 3, | |
| 3, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 2, | |
| 4, | |
| 3, | |
| 2, | |
| 2, | |
| 2, | |
| 3, | |
| 3, | |
| 3, | |
| 2 | |
| ], | |
| "dtype": "float32", | |
| "eos_token_id": 0, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "entailment", | |
| "1": "neutral", | |
| "2": "contradiction" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1024, | |
| "label2id": { | |
| "contradiction": 2, | |
| "entailment": 0, | |
| "neutral": 1 | |
| }, | |
| "max_position_embeddings": 2048, | |
| "mlp_bias": false, | |
| "model_type": "ultrabert", | |
| "num_attention_heads": 6, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 6, | |
| "pad_token_id": 0, | |
| "prediction_head_size": 768, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": [ | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0, | |
| 10000.0, | |
| 10000.0, | |
| 2560000.0 | |
| ], | |
| "tasks": [ | |
| "glue/mnli", | |
| "glue/qnli", | |
| "glue/rte", | |
| "glue/wnli", | |
| "glue/mrpc", | |
| "glue/qqp", | |
| "glue/stsb", | |
| "super_glue/boolq", | |
| "super_glue/boolq_passage", | |
| "super_glue/cb", | |
| "super_glue/multirc", | |
| "super_glue/wic", | |
| "super_glue/axg", | |
| "anli/a1", | |
| "anli/a2", | |
| "anli/a3", | |
| "sick/label", | |
| "snli", | |
| "scitail/snli_format", | |
| "hans", | |
| "WANLI", | |
| "recast/recast_factuality", | |
| "recast/recast_ner", | |
| "recast/recast_sentiment", | |
| "recast/recast_megaveridicality", | |
| "recast/recast_puns", | |
| "recast/recast_verbnet", | |
| "recast/recast_verbcorner", | |
| "probability_words_nli/usnli", | |
| "probability_words_nli/reasoning_2hop", | |
| "probability_words_nli/reasoning_1hop", | |
| "nan-nli", | |
| "nli_fever", | |
| "breaking_nli", | |
| "conj_nli", | |
| "fracas", | |
| "dialogue_nli", | |
| "mpe", | |
| "dnc", | |
| "recast_white/fnplus", | |
| "recast_white/sprl", | |
| "recast_white/dpr", | |
| "robust_nli/IS_CS", | |
| "robust_nli/LI_LI", | |
| "robust_nli/ST_WO", | |
| "robust_nli/PI_SP", | |
| "robust_nli/PI_CD", | |
| "robust_nli/ST_SE", | |
| "robust_nli/ST_NE", | |
| "robust_nli/ST_LM", | |
| "robust_nli_is_sd", | |
| "robust_nli_li_ts", | |
| "add_one_rte", | |
| "paws/labeled_final", | |
| "glue/cola", | |
| "glue/sst2", | |
| "pragmeval/pdtb", | |
| "lex_glue/scotus", | |
| "lex_glue/ledgar", | |
| "lex_glue/unfair_tos", | |
| "code_x_glue_cc_defect_detection", | |
| "dynasent/dynabench.dynasent.r1.all/r1", | |
| "dynasent/dynabench.dynasent.r2.all/r2", | |
| "cycic_classification", | |
| "lingnli", | |
| "monotonicity-entailment", | |
| "scinli", | |
| "naturallogic", | |
| "dynahate", | |
| "syntactic-augmentation-nli", | |
| "autotnli", | |
| "defeasible-nli/atomic", | |
| "defeasible-nli/snli", | |
| "defeasible-nli/social", | |
| "help-nli", | |
| "nli-veridicality-transitivity", | |
| "lonli", | |
| "dadc-limit-nli", | |
| "folio", | |
| "tomi-nli", | |
| "temporal-nli", | |
| "counterfactually-augmented-snli", | |
| "cnli", | |
| "boolq-natural-perturbations", | |
| "equate", | |
| "chaos-mnli-ambiguity", | |
| "logiqa-2.0-nli", | |
| "mindgames", | |
| "ConTRoL-nli", | |
| "logical-fallacy", | |
| "conceptrules_v2", | |
| "zero-shot-label-nli", | |
| "scone", | |
| "monli", | |
| "SpaceNLI", | |
| "propsegment/nli", | |
| "FLD.v2/default", | |
| "FLD.v2/star", | |
| "SDOH-NLI", | |
| "scifact_entailment", | |
| "feasibilityQA", | |
| "AdjectiveScaleProbe-nli", | |
| "resnli", | |
| "semantic_fragments_nli", | |
| "dataset_train_nli", | |
| "nlgraph", | |
| "ruletaker", | |
| "PARARULE-Plus", | |
| "logical-entailment", | |
| "nope", | |
| "LogicNLI", | |
| "contract-nli/contractnli_a/seg", | |
| "contract-nli/contractnli_b/full", | |
| "nli4ct_semeval2024", | |
| "biosift-nli", | |
| "SIGA-nli", | |
| "FOL-nli", | |
| "doc-nli", | |
| "mctest-nli", | |
| "natural-language-satisfiability", | |
| "idioms-nli", | |
| "lifecycle-entailment", | |
| "MSciNLI", | |
| "hover-3way/nli", | |
| "seahorse_summarization_evaluation", | |
| "missing-item-prediction/contrastive", | |
| "Pol_NLI", | |
| "synthetic-retrieval-NLI/position", | |
| "synthetic-retrieval-NLI/count", | |
| "synthetic-retrieval-NLI/binary", | |
| "babi_nli" | |
| ], | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.17.0", | |
| "vocab_size": 49152 | |
| } | |