Edit model card

Model Card for Model ID

Model Details

Model Description

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
Safetensors
Model size
102M params
Tensor type
I64
·
F32
·
Inference Examples
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

Adapter
(1)
this model

Dataset used to train scfengv/TVL_GeneralLayerClassifier