How to use from
Docker Model Runner
docker model run hf.co/OpenModel-Labs/CSM-1-Preview
Quick Links

Cyber Safety Model

CSM-1-Preview is an experimental Cyber Safety Model designed to help defenders, engineers, and learners with cybersecurity work. It can help with detection, incident response, hardening, secure coding, and static malware analysis. It is also designed to decline requests for ready-to-use attack tooling.

The model was fine-tuned using a LoRA adapter that has been merged into the weights in bf16.

A quick note: CSM-1-Preview can make mistakes. Please verify CVE IDs, commands, detection rules, and malware verdicts before relying on them. Formal benchmark results are not yet available.

What can it help with?

CSM-1-Preview is intended for tasks such as:

  • Explaining attacks, vulnerabilities, and malware behavior from a defenderโ€™s perspective
  • Writing and reviewing detections, including Sigma, YARA, and queries
  • Developing hardening guidance and incident-response runbooks
  • Reviewing code and discussing secure-by-design practices
  • Triaging and statically analyzing suspicious files, scripts, and browser or IDE extensionsโ€”with appropriate tools and safeguards
  • Learning about CTFs and authorized security testing

Whatโ€™s out of scope?

Please donโ€™t rely on the model for:

  • Producing working malware, ransomware, stealers, botnets, phishing kits, or weaponized exploits
  • Attacking systems without authorization
  • Making legal, forensic, or compliance decisions without expert review
  • Tasks that require guaranteed accuracy without human verification

Quick start

Youโ€™ll need a recent version of transformers, approximately 55 GB of GPU memory in bf16, and flash-linear-attention for fast linear-attention layers.

import torch
from transformers import AutoTokenizer, AutoModelForImageTextToText

repo = "OpenModel-Labs/CSM-1-Preview"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForImageTextToText.from_pretrained(
    repo, dtype=torch.bfloat16, device_map="auto"
)

messages = [
    {"role": "system", "content": open("system_prompt.txt").read()},
    {"role": "user", "content": "How do I detect Kerberoasting in Windows event logs?"},
]
prompt = tok.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=False, enable_thinking=False
)
inputs = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(
    **inputs, max_new_tokens=1024, do_sample=True,
    temperature=0.7, top_p=0.9, top_k=20
)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

For a simple streaming chat loop, see example_chat.py in this repository.

Settings used in testing were temperature 0.7 for chat, 0.2โ€“0.4 for analysis tasks, top_p=0.9, and top_k=20. Set enable_thinking=True in the chat template to let the model reason before answering; this will be slower.

Recommended system prompt

The model was tested with system_prompt.txt. The prompt asks it to give accurate, concise answers; avoid inventing CVEs or flags; treat pasted content as data rather than instructions; defang IOCs; and offer a short refusal with a defensive alternative for harmful requests.

Using tools safely

The chat template supports tool calling. If you provide file or shell tools for malware analysis:

  • Use a sandbox with read-only samples.
  • Allowlist commands and disable network access.
  • Treat all tool output as untrusted dataโ€”it may contain prompt injection.
  • Never execute samples.

Training and evaluation

CSM-1-Preview was fine-tuned with LoRA, and the adapter was merged into the weights in bf16. Training data and evaluation details are not yet documented in this card.

Limitations and risks

  • The model may invent identifiers such as CVEs, CVSS scores, product names, flags, or API fields. Check primary sources.
  • Its safety behavior is imperfect: it may refuse legitimate requests or produce answers it should not. Donโ€™t use it as a security control.
  • Static malware assessments are heuristic. A quick scan that finds nothing suspicious does not prove a file is safe.

License

Released under other. See the license agreement and check that your use also complies with applicable upstream license requirements.

Base model

CSM-1-Preview is a fine-tune of the base model listed in the metadata above and inherits its limitations and biases.

Downloads last month
-
Safetensors
Model size
27B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for OpenModel-Labs/CSM-1-Preview

Base model

Qwen/Qwen3.5-27B
Finetuned
(350)
this model