Instructions to use bisalsaha/bart-trade-doc-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bisalsaha/bart-trade-doc-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bisalsaha/bart-trade-doc-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bisalsaha/bart-trade-doc-classifier") model = AutoModelForSequenceClassification.from_pretrained("bisalsaha/bart-trade-doc-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from bisalsaha/bart-trade-doc-classifier: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/bisalsaha/bart-trade-doc-classifier/resolve/main/config.json
- Command line
-
hf download hf://bisalsaha/bart-trade-doc-classifier/config.json
-
curl -L -o config.json https://huggingface.co/bisalsaha/bart-trade-doc-classifier/resolve/main/config.json
2.04 kB
| { | |
| "activation_dropout": 0.1, | |
| "activation_function": "gelu", | |
| "add_bias_logits": false, | |
| "add_final_layer_norm": false, | |
| "architectures": [ | |
| "BartForSequenceClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "bos_token_id": 0, | |
| "classif_dropout": 0.1, | |
| "classifier_dropout": 0.0, | |
| "d_model": 768, | |
| "decoder_attention_heads": 12, | |
| "decoder_ffn_dim": 3072, | |
| "decoder_layerdrop": 0.0, | |
| "decoder_layers": 6, | |
| "decoder_start_token_id": 2, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "encoder_attention_heads": 12, | |
| "encoder_ffn_dim": 3072, | |
| "encoder_layerdrop": 0.0, | |
| "encoder_layers": 6, | |
| "eos_token_id": 2, | |
| "forced_eos_token_id": 2, | |
| "gradient_checkpointing": false, | |
| "id2label": { | |
| "0": "Commercial Invoice", | |
| "1": "Bill of Lading", | |
| "2": "Packing List", | |
| "3": "Certificate of Origin", | |
| "4": "LCA Form", | |
| "5": "Letter of Credit", | |
| "6": "Bill of Entry", | |
| "7": "IMP Form", | |
| "8": "EXP Form", | |
| "9": "PRC" | |
| }, | |
| "init_std": 0.02, | |
| "is_decoder": false, | |
| "is_encoder_decoder": true, | |
| "label2id": { | |
| "Bill of Entry": 6, | |
| "Bill of Lading": 1, | |
| "Certificate of Origin": 3, | |
| "Commercial Invoice": 0, | |
| "EXP Form": 8, | |
| "IMP Form": 7, | |
| "LCA Form": 4, | |
| "Letter of Credit": 5, | |
| "PRC": 9, | |
| "Packing List": 2 | |
| }, | |
| "max_position_embeddings": 1024, | |
| "model_type": "bart", | |
| "normalize_before": false, | |
| "normalize_embedding": true, | |
| "pad_token_id": 1, | |
| "problem_type": "single_label_classification", | |
| "scale_embedding": false, | |
| "task_specific_params": { | |
| "summarization": { | |
| "length_penalty": 1.0, | |
| "max_length": 128, | |
| "min_length": 12, | |
| "num_beams": 4 | |
| }, | |
| "summarization_cnn": { | |
| "length_penalty": 2.0, | |
| "max_length": 142, | |
| "min_length": 56, | |
| "num_beams": 4 | |
| }, | |
| "summarization_xsum": { | |
| "length_penalty": 1.0, | |
| "max_length": 62, | |
| "min_length": 11, | |
| "num_beams": 6 | |
| } | |
| }, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.16.1", | |
| "use_cache": false, | |
| "vocab_size": 50265 | |
| } | |