Instructions to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "deer-sec/CyberStag-Security-26B-A4B-V1-BF16-MLX" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
CyberStag-Security-26B-A4B-V1 (Cybersecurity Reasoning Text Model)
[日本語版は下に記載しています / Japanese version is available below]
Overview
CyberStag-Security-26B-A4B-V1 is a highly specialized, text-only large language model designed explicitly for cybersecurity analysis and deep logical reasoning. Built upon the robust Gemma-4-26B-A4B architecture (MoE), this model has been fine-tuned using mlx_lm.lora to excel in understanding complex security domains. The LoRA adapters have been successfully merged into the base model for seamless deployment.
This model serves as a powerful reasoning engine for security professionals, researchers, SOC analysts, and system administrators. It enhances capabilities in threat modeling, vulnerability assessment, interpreting obscure system logs, and structuring comprehensive incident response strategies. Note: This is a text-only model and does not process image, audio, or multi-modal inputs.
Performance Improvements
Comparative testing against the base model in cybersecurity contexts has confirmed the following improvements:
- Enhanced Response Quality: The model provides more accurate, context-aware, and actionable responses to intricate cybersecurity queries, excelling at decomposing complex attack vectors and suggesting robust mitigation strategies.
- Deeper Reasoning: We have observed a slight increase in "thinking time" (processing latency). This trade-off allows for profound, step-by-step logical deductions, yielding higher-quality analytical outputs compared to the base model.
Training Details
The model was fine-tuned on a carefully curated, distilled dataset focusing on advanced cybersecurity concepts, precise threat intelligence, logical deduction, and complex security scenarios. (Note: To maintain model integrity and prevent misuse, the granular details of the training data remain confidential.)
Fine-Tuning Strategy & LoRA Configuration
- Base Model:
Gemma-4-26B-A4B(MoE) - Training Method:
mlx_lmLoRA (Low-Rank Adaptation), fully merged. - Trainable Parameters: 1.778% (approx. 448.7M / 25.23B parameters).
- Optimization Strategy: Targeting was broad and strategic, updating comprehensive Attention and MLP mechanisms (including
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj, and expert layers). This approach, combined with optimized context management, captures the nuances of cybersecurity terminology and code structures without catastrophic forgetting.
Available Models
We provide multiple formats to suit various hardware environments.
MLX Formats (Optimized for Apple Silicon)
CyberStag-Security-26B-A4B-V1-BF16-MLX: Unquantized bf16 (Maximum precision).CyberStag-Security-26B-A4B-V1-OptiQ8-MLX: Dynamically 8-bit quantized usingmlx-optiq(Balanced footprint/performance).
GGUF Formats (llama.cpp, LM Studio, etc.)
CyberStag-Security-26B-A4B-V1-BF16-GGUF: Unquantized 16-bit.CyberStag-Security-26B-A4B-V1-Q8_0-GGUF: 8-bit quantized.CyberStag-Security-26B-A4B-V1-Q4_K_M-GGUF: 4-bit quantized (Recommended for limited VRAM).
Usage
MLX
from mlx_lm import load, generate
model, tokenizer = load("deer-sec/CyberStag-Security-26B-A4B-V1-OptiQ8-MLX")
prompt = "Analyze the following server access log for potential SQL injection vulnerabilities: [LOG DATA]"
response = generate(model, tokenizer, prompt=prompt, max_tokens=4096)
print(response)
llama.cpp (GGUF)
./main -m CyberStag-Security-26B-A4B-V1-Q4_K_M.gguf -n 4096 -p "Explain the mechanics of a CSRF attack and effective mitigation strategies."
License
This model inherits the license of the base model and is provided under the Apache License 2.0. Commercial use, modification, and redistribution are freely permitted.
Disclaimer
This model is provided solely for educational, defensive research, and system resilience purposes. Usage for unauthorized access, exploit generation, or any cybercrime is strictly prohibited. By downloading/utilizing this model, you agree to employ it only for ethical security research.
CyberStag-Security-26B-A4B-V1 (サイバーセキュリティ推論特化テキストモデル)
概要
CyberStag-Security-26B-A4B-V1 は、サイバーセキュリティ分野の分析と高度な論理的推論に特化して開発された、テキスト専用の大規模言語モデルです。堅牢な Gemma-4-26B-A4B (MoE) アーキテクチャをベースとし、MLXフレームワーク (mlx_lm.lora) を用いてファインチューニングを実施しました。学習完了後、LoRAアダプターはベースモデルにマージされており、すぐにデプロイして使用することが可能です。
本モデルは、セキュリティ専門家、研究者、SOCアナリスト、システム管理者などが、脅威モデリング、脆弱性評価、ログの解釈、そして包括的なインシデント対応戦略を構築する際の推論エンジンを目指して作られています。 ※本モデルはテキスト入力専用であり、画像や音声などのマルチモーダル入力には対応していません。
ベースモデルからの性能向上
サイバーセキュリティに関する様々な質問を用いてオリジナルのベースモデルと比較検証を行った結果、本モデルには以下の特徴が確認されています。
- 回答品質の向上: 複雑なサイバーセキュリティの質問に対し、より正確で文脈に沿った、実務に直結する回答を提供します。複雑な攻撃ベクトルの分解や、堅牢な緩和策の提案において優れた性能を発揮します。
- 推論の深さ: 回答の生成を開始するまでの「思考時間(レイテンシ)」がわずかに増加する傾向が見られます。これは、表面的な回答を避け、より深くステップバイステップの論理的演繹を行うためのトレードオフであり、結果として非常に分析的で高品質な出力を生み出すものと考えます。
学習詳細
本モデルは、高度なサイバーセキュリティの概念、正確な脅威インテリジェンス、論理的演繹、および複雑なセキュリティシナリオに重点を置いて慎重にキュレーション・蒸留されたデータセットを用いてファインチューニングされています。 (注:学習データの詳細や具体的な構成については非公開としています)
ファインチューニング戦略とLoRA設定
ベースモデルの汎用性を維持しつつ、セキュリティ領域の学習効率を最大化するため、細心の注意を払って学習プロセスを設計しました。
- ベースモデル:
Gemma-4-26B-A4B(MoE) - 学習手法:
mlx_lmによる LoRA (Low-Rank Adaptation)、ベースモデルへマージ済み - 学習可能パラメータ (Trainable parameters): 1.778% (約 448.7M / 25.23B パラメータ)
- 最適化の工夫: LoRAのターゲットは広範かつ戦略的に設定されています。Attention層とMLP層の主要なメカニズム(
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj、およびExpert層など)を包括的に更新するよう構成しました。この広範なターゲティングと、コンテキスト長の管理により、既存の知識を破壊することなく(破滅的忘却の防止)、ファインチューニングに成功しております。
公開モデル
ハイエンドなワークステーションからエッジデバイスまで、様々なハードウェア環境に対応するため、複数のフォーマットを提供しています。
MLX フォーマット (Apple Silicon向け最適化)
CyberStag-Security-26B-A4B-V1-BF16-MLX: 最高精度の推論能力を提供する非量子化(bf16)フォーマット。CyberStag-Security-26B-A4B-V1-OptiQ8-MLX:mlx-optiqを用いて動的に8ビット量子化されたモデル。メモリ使用量を大幅に削減しつつ、オリジナルの推論性能をほぼ維持する、非常にバランスの取れたフォーマット。
GGUF フォーマット (llama.cpp, LM Studio 等向け)
CyberStag-Security-26B-A4B-V1-BF16-GGUF: 非量子化 16bit GGUFモデル。CyberStag-Security-26B-A4B-V1-Q8_0-GGUF: 8bit 量子化 GGUFモデル (高精度、中程度のメモリ要求)。CyberStag-Security-26B-A4B-V1-Q4_K_M-GGUF: 4bit 量子化 GGUFモデル (非常に軽量。VRAMに制限のある環境での実行に強く推奨します)。
使用方法
MLXでの実行例
from mlx_lm import load, generate
# 動的8ビット量子化モデルの読み込み
model, tokenizer = load("deer-sec/CyberStag-Security-26B-A4B-V1-OptiQ8-MLX")
prompt = "以下のサーバーアクセスログを分析し、潜在的なSQLインジェクションの脆弱性がないか確認し、その攻撃ベクトルを解説してください: [ログデータ]"
response = generate(model, tokenizer, prompt=prompt, max_tokens=4096)
print(response)
llama.cpp (GGUF)での実行例
./main -m CyberStag-Security-26B-A4B-V1-Q4_K_M.gguf -n 4096 -p "モダンなWebアプリケーションにおけるクロスサイトリクエストフォージェリ(CSRF)攻撃の仕組みと、最も効果的な緩和策について詳細に説明してください。"
ライセンス (License)
本モデルは元モデルのライセンスを継承し、Apache License 2.0 の下で提供されています。商用利用、改変、再配布が自由に可能です。
免責事項 (Disclaimer)
本モデルは、教育目的、防御的なサイバーセキュリティ研究、およびシステム回復力の向上を目的としてのみ提供されています。また、本モデルを不正アクセス、攻撃用エクスプロイトの生成、その他あらゆるサイバー犯罪に悪用することを明確に禁止しています。 なお、本モデルをダウンロードおよび利用した時点で、ユーザーはセキュリティの向上および倫理的な研究の目的にのみ本モデルを使用することに明示的に同意したものとみなされます。
- Downloads last month
- 154
Quantized