Instructions to use raoulmago/doc_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raoulmago/doc_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="raoulmago/doc_classification")# Load model directly from transformers import AutoProcessor, AutoModelForTokenClassification processor = AutoProcessor.from_pretrained("raoulmago/doc_classification") model = AutoModelForTokenClassification.from_pretrained("raoulmago/doc_classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "microsoft/layoutlmv3-base", | |
| "architectures": [ | |
| "LayoutLMv3ForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "coordinate_size": 128, | |
| "eos_token_id": 2, | |
| "has_relative_attention_bias": true, | |
| "has_spatial_attention_bias": true, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "0", | |
| "1": "codice_fiscale", | |
| "2": "cognome", | |
| "3": "nome", | |
| "4": "data_nascita", | |
| "5": "comune_nascita", | |
| "6": "prov_nascita", | |
| "7": "cittadinanza", | |
| "8": "comune_residenza", | |
| "9": "prov_residenza", | |
| "10": "via_residenza", | |
| "11": "data_emissione", | |
| "12": "data_scadenza", | |
| "13": "codice_documento", | |
| "14": "comune_emissione", | |
| "15": "prov_emissione" | |
| }, | |
| "initializer_range": 0.02, | |
| "input_size": 224, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "0": 0, | |
| "cittadinanza": 7, | |
| "codice_documento": 13, | |
| "codice_fiscale": 1, | |
| "cognome": 2, | |
| "comune_emissione": 14, | |
| "comune_nascita": 5, | |
| "comune_residenza": 8, | |
| "data_emissione": 11, | |
| "data_nascita": 4, | |
| "data_scadenza": 12, | |
| "nome": 3, | |
| "prov_emissione": 15, | |
| "prov_nascita": 6, | |
| "prov_residenza": 9, | |
| "via_residenza": 10 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "max_2d_position_embeddings": 1024, | |
| "max_position_embeddings": 514, | |
| "max_rel_2d_pos": 256, | |
| "max_rel_pos": 128, | |
| "model_type": "layoutlmv3", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "patch_size": 16, | |
| "rel_2d_pos_bins": 64, | |
| "rel_pos_bins": 32, | |
| "second_input_size": 112, | |
| "shape_size": 128, | |
| "text_embed": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.35.2", | |
| "type_vocab_size": 1, | |
| "visual_embed": true, | |
| "vocab_size": 50265 | |
| } | |