Run this model with HF Jobs
Run nikotang/span-nli-bert-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/nikotang/span-nli-bert-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nikotang/span-nli-bert-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use nikotang/span-nli-bert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nikotang/span-nli-bert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nikotang/span-nli-bert-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, BertForIdentificationClassification tokenizer = AutoTokenizer.from_pretrained("nikotang/span-nli-bert-base") model = BertForIdentificationClassification.from_pretrained("nikotang/span-nli-bert-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Initial upload
Browse filesFiles changed (10)
- added_tokens.jsonAdded+1
- conf.ymlAdded+93
- config.jsonAdded+26
- metrics.jsonAdded
- pytorch_model.binAdded+3
- result.jsonAdded
- special_tokens_map.jsonAdded+1
- tensorboard/events.out.tfevents.1676955697.s199.uppmax.uu.se.54741.0Added+3
- tokenizer_config.jsonAdded+1
- vocab.txtAdded
1{"[SPAN]": 30522}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293# Path to pretrained model or model identifier from huggingface.co/modelsmodel_name_or_path: "bert-base-uncased"
train_file: "./data/train.json"
dev_file: "./data/dev.json"
# Pretrained config name or path if not the same as model_nameconfig_name: null
# Pretrained tokenizer name or path if not the same as model_nametokenizer_name: null
# Directory to save downloaded pretrained model# Default to ~/.cache/huggingface/transformerscache_dir: null
# The maximum total input sequence length.# Sequence longer max_seq_length will be splitted into different chunks.max_seq_length: 512
# How many tokens should the first span have in each chunk.# Note that it may not be honored when the span is too long.doc_stride: 64
# The maximum number of tokens for the hypothesis.# Hypotheses longer than this will be truncated.max_query_length: 256
# Set this flag if you are using an uncased model.do_lower_case: true
per_gpu_train_batch_size: 8
per_gpu_eval_batch_size: 8
learning_rate: !!float 3e-5
# Number of updates steps to accumulate before performing a backward/update pass.gradient_accumulation_steps: 1
weight_decay: 0.0
adam_epsilon: !!float 1e-8
max_grad_norm: 1.0
num_epochs: 5.0
# If set, total number of training steps to perform. Conflicts with num_epochs.max_steps: null
# Linear warmup over warmup_stepswarmup_steps: 200
# language id of input for language-specific xlm models (see tokenization_xlm.PRETRAINED_INIT_CONFIGURATION)lang_id: null
# Validate every n stepsvalid_steps: 3000
early_stopping: true
# save model every n stepssave_steps: -1
seed: 42
# Whether to use 16-bit (mixed) precision (through NVIDIA apex) instead of 32-bitfp16: false
# For fp16: Apex AMP optimization level selected in ['O0', 'O1', 'O2', and 'O3'].# See details at https://nvidia.github.io/apex/amp.htmlfp16_opt_level: "O1"
# Make it true if you have a gpu but you don't want to use itno_cuda: false
# Overwrite the cached training and evaluation setsoverwrite_cache: false
weight_class_probs_by_span_probs: true
# class loss is multiplied by this valueclass_loss_weight: 0.1
# Either of 'identification_classification' or 'classification'task: "identification_classification"
# Whether to treat hypothesis (query) texts as a symbol instead of feeding the# hypothesis descriptionssymbol_based_hypothesis: false1234567891011121314151617181920212223242526{ "_name_or_path": "./output/best-checkpoint", "architectures": [ "BertForIdentificationClassification" ], "attention_probs_dropout_prob": 0.1, "class_loss_weight": 0.1, "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "impossible_strategy": "ignore", "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 0, "position_embedding_type": "absolute", "transformers_version": "4.5.1", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30523}123version https://git-lfs.github.com/spec/v1oid sha256:12e2951142577a28db3d3abb5fc5b7d5050a4f7503826998af749b642eb16e3asize 4380353081{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "additional_special_tokens": ["[SPAN]"]}123version https://git-lfs.github.com/spec/v1oid sha256:76efb59497a331188aeb83331204c1278e942f6798842877256334f2711338afsize 86523181{"do_lower_case": true, "do_basic_tokenize": true, "never_split": null, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "tokenizer_file": "/home/yiukei/.cache/huggingface/transformers/534479488c54aeaf9c3406f647aa2ec13648c06771ffe269edabebd4c412da1d.7f2721073f19841be16f41b0a70b600ca6b880c8f3df6f3535cbc704371bdfa4", "name_or_path": "bert-base-uncased"}added_tokens.jsonAdded+1
conf.ymlAdded+93
config.jsonAdded+26
metrics.jsonAdded
pytorch_model.binAdded+3
result.jsonAdded
special_tokens_map.jsonAdded+1
tensorboard/events.out.tfevents.1676955697.s199.uppmax.uu.se.54741.0Added+3
tokenizer_config.jsonAdded+1
vocab.txtAdded