Bulk Modulus along Jamming Transition Lines of Bidisperse Granular Packings
Paper
β’
2103.02557
β’
Published
BERT model specialized for patent classification using the CPC (Cooperative Patent Classification) system. (PyTorch version of the original PatentBert model.)
The model predicts classes according to the authentic CPC system used in PatentBERT training:
A01B: SOIL WORKING IN AGRICULTURE OR FORESTRYB25J: MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICESC07D: HETEROCYCLIC COMPOUNDSG06F: ELECTRIC DIGITAL DATA PROCESSINGH04L: TRANSMISSION OF DIGITAL INFORMATIONfrom transformers import BertForSequenceClassification, BertTokenizer
import json
import torch
# Load model and tokenizer
model = BertForSequenceClassification.from_pretrained('ZoeYou/patentbert-pytorch')
tokenizer = BertTokenizer.from_pretrained('ZoeYou/patentbert-pytorch')
# Inference example
text = "A method for producing synthetic materials with enhanced thermal properties..."
inputs = tokenizer(text, return_tensors="pt", max_length=512, truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = outputs.logits.softmax(dim=-1)
# Get prediction
predicted_class_id = predictions.argmax().item()
confidence = predictions.max().item()
# Use model labels (CPC codes)
predicted_label = model.config.id2label[str(predicted_class_id)]
print(f"Predicted CPC class: {predicted_label} (ID: {predicted_class_id})")
print(f"Confidence: {confidence:.2%}")
model.safetensors: Model weights (420 MB)config.json: Configuration with integrated CPC labelsvocab.txt: Tokenizer vocabularytokenizer_config.json: Tokenizer configurationlabels.json: Complete CPC label mapping (656 authentic labels)README.md: This documentationThis model was trained on a large patent corpus to automatically classify documents according to the CPC system, using the exact same 656 CPC codes from the original PatentBERT training data.
If you use this model, please cite the original PatentBERT work and mention this PyTorch conversion.
@article{patent_bert,
author = "Jieh-Sheng Lee and Jieh Hsiang",
title = "{PatentBERT: Patent classification with fine-tuning a pre-trained BERT model}",
journal = "World Patent Information",
volume = "61",
number = "101965",
year = "2020",
}
Base model
google-bert/bert-base-uncased