Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: mit

Model Performance

  • Accuracy: 70.12% ± 0.44%
  • Macro-F1: 47.98% ± 6.37%
  • Zero-Shot Baseline (before fine-tuning): 35.5%

Label Classes (17 Categories)

STIX 2.1 Categories: attack-pattern, campaign, identity, location, malware, threat-actor, tools, vulnerability
NER Entities: DOMAIN, FILEPATH, IPV4, O, SHA1, SHA2, SOFTWARE, TIME, URL

How to Use

Because this is a LoRA adapter, you must load it using the PeftModel architecture:

python

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel

1. Load the base model

base_model_id = "google/gemma-2-2b-it" base_model = AutoModelForSequenceClassification.from_pretrained( base_model_id, num_labels=17, device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained(base_model_id)

2. Load this LoRA adapter

adapter_id = "MelihCan1115/cti-gemma-2-2b_seed123" # Kendi kullanıcı adınızı yazın model = PeftModel.from_pretrained(base_model, adapter_id)

3. Predict

text = "A new ransomware variant encrypts victim files." inputs = tokenizer(text, return_tensors="pt").to("cuda") outputs = model(**inputs) predictions = torch.argmax(outputs.logits, dim=-1) print(predictions)


[TR]

Siber Tehdit İstihbaratı (CTI) Sınıflandırması için Gemma-2-2b

Bu model, mrmoor/cyber-threat-intelligence veri seti üzerinde google/gemma-2-2b-it modelinin ince ayarlanmış bir versiyonudur. Siber güvenlik metinlerini 17 farklı STIX 2.1 ve NER varlık kategorisine sınıflandırmak üzere 4-bit QLoRA kullanılarak eğitilmiştir. Bu model, Büyük Dil Modelleri (LLM) dersinin final projesi kapsamında geliştirilmiştir.

Model Performansı

  • Doğruluk: %70,12 ± %0,44
  • Makro-F1: %47,98 ± %6,37
  • Zero-Shot Referans Değeri (fine-tuning öncesi): %35,5

Etiket Sınıfları (17 Kategori)

STIX 2.1 Kategorileri: attack-pattern, campaign, identity, location, malware, threat-actor, tools, vulnerability
NER Varlıkları: DOMAIN, FILEPATH, IPV4, O, SHA1, SHA2, SOFTWARE, TIME, URL

Nasıl Kullanılır

Bu bir LoRA adaptörü olduğu için, onu PeftModel mimarisini kullanarak yüklemelisiniz:

python

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel

1. Temel modeli yükleyin

base_model_id = “google/gemma-2-2b-it” base_model = AutoModelForSequenceClassification.from_pretrained( base_model_id, num_labels=17, device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained (base_model_id)

2. Bu LoRA adaptörünü yükleyin

adapter_id = “MelihCan1115/cti-gemma-2-2b_seed123” # Kendi kullanıcı adınızı girin model = PeftModel.from_pretrained(base_model, adapter_id)

3. Tahmin yapın

text = "Yeni bir fidye yazılımı türü, mağdurun dosyalarını şifreliyor

Model provider

MelihCan1115

Model tree

Base

google/gemma-2-2b-it

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today