Model Card for Model ID
Model Details
Model Description
- Developed by: scfengv
- Model type: BERT Multi-label Text Classification
- Language: Chinese (Zh)
- Finetuned from model: google-bert/bert-base-chinese
Model Sources
Model Inference Examples
To run the text classification inference, use the following command:
python inference_example_1.py
python inference_example_2.py
python inference_example_3.py
How to Get Started with the Model
import torch
from transformers import BertForSequenceClassification, BertTokenizer
# Load model and tokenizer
model = BertForSequenceClassification.from_pretrained("scfengv/TVL_GeneralLayerClassifier")
tokenizer = BertTokenizer.from_pretrained("scfengv/TVL_GeneralLayerClassifier")
# Prepare your text
text = "Your text here"
inputs = tokenizer(text, return_tensors = "pt", padding = True, truncation = True, max_length = 512)
# Make prediction
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.sigmoid(outputs.logits)
# Print predictions
print(predictions)
Training Details
Training Data
Training Procedure
Preprocessing
Training Hyperparameters
The model was trained using the following hyperparameters:
Learning rate: 1e-05
Batch size: 32
Number of epochs: 10
Optimizer: Adam
Evaluation
Results
- Accuracy: 0.9592504607823059
- F1 Score (Micro): 0.9740588950133884
- F1 Score (Macro): 0.9757074189160264
Technical Specifications
Model Architecture and Objective
[More Information Needed]
Compute Infrastructure
Hardware
- NVIDIA Quadro RTX8000
Software
- PyTorch
- HuggingFace
- Downloads last month
- 0
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for scfengv/TVL_GeneralLayerClassifier
Base model
google-bert/bert-base-chinese