Text Classification
Transformers
Safetensors
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use zgurney/patent-classification-gpu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zgurney/patent-classification-gpu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="zgurney/patent-classification-gpu")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("zgurney/patent-classification-gpu") model = AutoModelForSequenceClassification.from_pretrained("zgurney/patent-classification-gpu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from zgurney/patent-classification-gpu: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/zgurney/patent-classification-gpu/resolve/main/config.json
- Command line
-
hf download hf://zgurney/patent-classification-gpu/config.json
-
curl -L -o config.json https://huggingface.co/zgurney/patent-classification-gpu/resolve/main/config.json
1.65 kB
| { | |
| "_name_or_path": "distilbert-base-uncased", | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertForSequenceClassification" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "A23G", | |
| "1": "B65", | |
| "10": "A01", | |
| "11": "G06F", | |
| "12": "G", | |
| "13": "A47", | |
| "14": "H", | |
| "15": "C07", | |
| "16": "A", | |
| "17": "A61P", | |
| "18": "B", | |
| "19": "A63", | |
| "2": "A21", | |
| "20": "G06Q", | |
| "21": "A61K", | |
| "22": "A23L", | |
| "23": "A61", | |
| "24": "C07D", | |
| "25": "G01", | |
| "26": "F", | |
| "27": "D", | |
| "28": "H04L", | |
| "29": "C12N", | |
| "3": "C11", | |
| "30": "H04", | |
| "31": "E", | |
| "4": "C", | |
| "5": "C12", | |
| "6": "nan", | |
| "7": "A23", | |
| "8": "G06", | |
| "9": "C08" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "A": 16, | |
| "A01": 10, | |
| "A21": 2, | |
| "A23": 7, | |
| "A23G": 0, | |
| "A23L": 22, | |
| "A47": 13, | |
| "A61": 23, | |
| "A61K": 21, | |
| "A61P": 17, | |
| "A63": 19, | |
| "B": 18, | |
| "B65": 1, | |
| "C": 4, | |
| "C07": 15, | |
| "C07D": 24, | |
| "C08": 9, | |
| "C11": 3, | |
| "C12": 5, | |
| "C12N": 29, | |
| "D": 27, | |
| "E": 31, | |
| "F": 26, | |
| "G": 12, | |
| "G01": 25, | |
| "G06": 8, | |
| "G06F": 11, | |
| "G06Q": 20, | |
| "H": 14, | |
| "H04": 30, | |
| "H04L": 28, | |
| "nan": 6 | |
| }, | |
| "max_position_embeddings": 512, | |
| "model_type": "distilbert", | |
| "n_heads": 12, | |
| "n_layers": 6, | |
| "pad_token_id": 0, | |
| "problem_type": "single_label_classification", | |
| "qa_dropout": 0.1, | |
| "seq_classif_dropout": 0.2, | |
| "sinusoidal_pos_embds": false, | |
| "tie_weights_": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.48.0", | |
| "vocab_size": 30522 | |
| } | |