Run this model with HF Jobs

Run InfronAI/Inkling-2-Mini-Cyber on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/InfronAI/Inkling-2-Mini-Cyber. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/InfronAI/Inkling-2-Mini-Cyber on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
AndrewZheng997's picture
Publish defensive cybersecurity LoRA research preview
5b8dc2a verified
|
Raw History Blame Contribute Delete
2.95 kB
metadata
library_name: peft
base_model: thinkingmachines/Inkling-2-Mini
tags:
  - lora
  - cybersecurity

Inkling-2-Mini-Cyber

InfronAI releases this LoRA adapter as a research preview for defensive cybersecurity question answering. It is the supervised fine-tuning checkpoint identified as B in our experiments. It covers tasks such as interpreting logs, reviewing access controls and reading security advisories. Loading it requires the Thinking Machines Inkling-2-Mini base checkpoint.

Evaluation

Both models answered the same questions within each evaluation. The historical regression suite used frozen scoring rules and counted unscorable answers as failures. The independent advisory evaluation used two questions per product across 216 products. A correct response had to identify the affected version and cite supporting advisory text.

Measure Base checkpoint With this adapter
Historical regression questions passed 274/600 480/600
General questions passed, included in the regression total 49/50 45/50
Unscorable regression answers, lower is better 2/600 8/600
Independent advisory questions passed 231/432 88/432

Twenty regression prompts had high textual overlap with fine-tuning prompts. After removing those prompts, the base passed 262/580 and the adapter passed 472/580. The improvement on the historical suite did not carry over to the independent advisory task. The adapter missed the production qualification thresholds of at least 48/50 general questions passed and at most 2/600 unscorable answers.

Loading

The recorded GPU runtime used Transformers 5.24.0, PEFT 0.22.0 and PyTorch 2.14.1. The example loads the same base revision and enables the adapter on one BF16-capable GPU with sufficient memory.

import torch
from peft import PeftModel
from transformers import AutoModelForMultimodalLM, AutoProcessor

base_id = "thinkingmachines/Inkling-2-Mini"
revision = "7a67ae2314b44ef05c87fd1d4d311c58aaeb18f6"
processor = AutoProcessor.from_pretrained(base_id, revision=revision)
base = AutoModelForMultimodalLM.from_pretrained(
    base_id, revision=revision, dtype=torch.bfloat16, device_map={"": "cuda:0"}
)
model = PeftModel.from_pretrained(base, "InfronAI/Inkling-2-Mini-Cyber").eval()

Training and provenance

Supervised fine-tuning used 1,000 examples and 84 synchronized optimizer updates across three GPUs. The adapter uses rank 8 and alpha 32 on the attention query and output projections. The repository contains the adapter weights and configuration. Thinking Machines distributes the base checkpoint under Apache 2.0. See the upstream model card.

SHA-256 of adapter_model.safetensors is f4439096adbeea60e2fd8cbe9f548111a41b5e4a6faa6a810d7d46b8ac65b6cc.