Instructions to use arirajuns/bigbird-legal-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arirajuns/bigbird-legal-onnx 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="arirajuns/bigbird-legal-onnx")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("arirajuns/bigbird-legal-onnx") model = AutoModelForSeq2SeqLM.from_pretrained("arirajuns/bigbird-legal-onnx", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,061 Bytes
3249b2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | {
"activation_dropout": 0.0,
"activation_function": "gelu_new",
"architectures": [
"BigBirdPegasusForConditionalGeneration"
],
"attention_dropout": 0.0,
"attention_type": "block_sparse",
"block_size": 64,
"bos_token_id": 2,
"classifier_dropout": 0.0,
"d_model": 1024,
"decoder_attention_heads": 16,
"decoder_ffn_dim": 4096,
"decoder_layerdrop": 0.0,
"decoder_layers": 16,
"decoder_start_token_id": 2,
"dropout": 0.1,
"dtype": "float32",
"encoder_attention_heads": 16,
"encoder_ffn_dim": 4096,
"encoder_layerdrop": 0.0,
"encoder_layers": 16,
"eos_token_id": 1,
"gradient_checkpointing": false,
"init_std": 0.02,
"is_decoder": false,
"is_encoder_decoder": true,
"max_position_embeddings": 4096,
"model_type": "bigbird_pegasus",
"num_hidden_layers": 16,
"num_random_blocks": 3,
"pad_token_id": 0,
"scale_embedding": true,
"tie_word_embeddings": true,
"tokenizer_class": "PegasusTokenizer",
"transformers_version": "5.0.0",
"use_bias": false,
"use_cache": false,
"vocab_size": 96103
}
|