Text Classification
Transformers
Safetensors
PyTorch
English
tiny_log_classifier
cybersecurity
blue-team
log-analysis
custom-code
custom_code
Instructions to use mozarilla/tiny-blue-log-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mozarilla/tiny-blue-log-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mozarilla/tiny-blue-log-classifier", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("mozarilla/tiny-blue-log-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 582 Bytes
12097aa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from transformers import PretrainedConfig
class TinyLogConfig(PretrainedConfig):
model_type = "tiny_log_classifier"
def __init__(
self,
vocab_size=1024,
hidden_size=16,
num_labels=2,
pad_token_id=0,
max_position_embeddings=96,
**kwargs,
):
super().__init__(
num_labels=num_labels,
pad_token_id=pad_token_id,
**kwargs,
)
self.vocab_size = vocab_size
self.hidden_size = hidden_size
self.max_position_embeddings = max_position_embeddings
|