Instructions to use j4n4/Bimo-7B-CyberAgent-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use j4n4/Bimo-7B-CyberAgent-MLX-4bit 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("j4n4/Bimo-7B-CyberAgent-MLX-4bit") 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
- MLX LM
How to use j4n4/Bimo-7B-CyberAgent-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "j4n4/Bimo-7B-CyberAgent-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "j4n4/Bimo-7B-CyberAgent-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "j4n4/Bimo-7B-CyberAgent-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Bimo-7B-CyberAgent-MLX-4bit
MLX format conversion of iBimo-o/Bimo-7B-CyberAgent (a fine-tune of Qwen/Qwen2.5-Coder-7B-Instruct by Saim Azam for defensive cybersecurity auditing, vulnerability triage, and multi-turn JSON tool calling, with 32K YaRN context) optimized for Apple Silicon.
Uniform 4-bit affine MLX quantization (group_size=64, 4.50 effective bpw). Fastest decode throughput and smallest memory footprint — runs comfortably even on 8 GB Apple Silicon Macs.
Quantization & Format Details
- Method: Uniform 4-bit affine quantization (
mlx-lm 0.32.2,--q-bits 4 --q-group-size 64) - Effective Bits-per-Weight: 4.501 bpw
- Original Model: iBimo-o/Bimo-7B-CyberAgent
- Architecture:
Qwen2ForCausalLM(7.62B params, 32,768 YaRN context) - License: Apache 2.0
All Available MLX Variants & Benchmarks
Benchmarked on Apple M1 Max (64 GB Unified Memory) with mlx 0.32.5 / mlx-lm 0.32.2 (--temp 0.0, --max-tokens 128):
| Variant | Repository | Disk Size | Peak RAM | Prompt (tok/s) | Gen (tok/s) |
|---|---|---|---|---|---|
| BF16 | j4n4/Bimo-7B-CyberAgent-MLX-bf16 | 14.20 GB | 15.35 GB | 230.3 | 22.95 |
| OptiQ-8bit (oQ8) | j4n4/Bimo-7B-CyberAgent-MLX-OptiQ-8bit | 8.95 GB | 9.76 GB | 221.4 | 36.96 |
| 8-bit | j4n4/Bimo-7B-CyberAgent-MLX-8bit | 7.55 GB | 8.24 GB | 203.8 | 41.63 |
| 6-bit | j4n4/Bimo-7B-CyberAgent-MLX-6bit | 5.77 GB | 6.38 GB | 212.6 | 53.10 |
| OptiQ-4bit (oQ4) | j4n4/Bimo-7B-CyberAgent-MLX-OptiQ-4bit | 5.08 GB | 5.67 GB | 233.8 | 60.51 |
| 4-bit | j4n4/Bimo-7B-CyberAgent-MLX-4bit (this repo) | 4.00 GB | 4.54 GB | 295.2 | 72.96 |
Quick Start with mlx-lm
CLI (Generate)
pip install -U mlx-lm
mlx_lm.generate \
--model j4n4/Bimo-7B-CyberAgent-MLX-4bit \
--prompt 'Identify the vulnerability in: cursor.execute(f"SELECT * FROM users WHERE id = {user_id}") and provide a fix.'
Or zero-install with uv:
uvx --from mlx-lm mlx_lm.generate \
--model j4n4/Bimo-7B-CyberAgent-MLX-4bit \
--prompt "Summarize common SSRF bypass patterns and how to mitigate them."
OpenAI-Compatible Local Server (for Agents & Tool Calling)
mlx_lm.server --model j4n4/Bimo-7B-CyberAgent-MLX-4bit --port 8080
Python
from mlx_lm import load, generate
model, tokenizer = load("j4n4/Bimo-7B-CyberAgent-MLX-4bit")
messages = [{"role": "user", "content": "Review this Python snippet for SQL injection risks."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
Responsible Use
Use this model only for authorized security auditing, defensive engineering, and educational research. Please refer to the original iBimo-o/Bimo-7B-CyberAgent model card for full training methodology, benchmarks, and safety guidance.
- Downloads last month
- 44
4-bit
Model tree for j4n4/Bimo-7B-CyberAgent-MLX-4bit
Base model
Qwen/Qwen2.5-7B