Instructions to use mdomina/Qwen3-Coder-Next-Cyber with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mdomina/Qwen3-Coder-Next-Cyber with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mdomina/Qwen3-Coder-Next-Cyber") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mdomina/Qwen3-Coder-Next-Cyber") model = AutoModelForCausalLM.from_pretrained("mdomina/Qwen3-Coder-Next-Cyber") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mdomina/Qwen3-Coder-Next-Cyber with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mdomina/Qwen3-Coder-Next-Cyber" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mdomina/Qwen3-Coder-Next-Cyber", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mdomina/Qwen3-Coder-Next-Cyber
- SGLang
How to use mdomina/Qwen3-Coder-Next-Cyber with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mdomina/Qwen3-Coder-Next-Cyber" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mdomina/Qwen3-Coder-Next-Cyber", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mdomina/Qwen3-Coder-Next-Cyber" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mdomina/Qwen3-Coder-Next-Cyber", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mdomina/Qwen3-Coder-Next-Cyber with Docker Model Runner:
docker model run hf.co/mdomina/Qwen3-Coder-Next-Cyber
Qwen3-Coder-Next-Cyber
Cybersecurity domain specialization of Qwen/Qwen3-Coder-Next (the instruct model), built by Expert Upcycling + freeze and knowledge-injected via self-distillation — not by full continued-pretraining.
The 80B instruct backbone is frozen (instruction-following and coding ability preserved by construction); cybersecurity capability lives in 32 added experts per layer (512 to 544) that are the only trained part.
Research artifact. Downstream evaluation (cyber benchmarks) in progress.
What it is
| Base | Qwen3-Coder-Next (instruct, 80B total / ~3B active, hybrid Gated DeltaNet + Attention + MoE, 512 experts top-10 + 1 shared, Apache-2.0) |
| Experts | 512 to 544 (k=32 cyber experts added per layer, 48 layers) |
| Trainable | only {new experts 512-543, router, shared expert} = ~5.04B of ~85B; backbone frozen |
| Total params | ~84.5B |
How it was built
- Expert upcycling: 32 new experts/layer cloned from high-utility experts (utility based on gradient-norm squared), router extended, top-k unchanged.
- Warm-start: the 32 new experts were first continued-pretrained on a cyber corpus (~200M tokens), then their trained weights were transplanted onto the instruct backbone.
- Self-distillation (this model): the model reads a domain passage in-context (teacher, open-book) and answers; the closed-book student (same weights) learns the answer. Trained only the 32 experts + router + shared (backbone + original 512 experts frozen), ~43k self-distilled QA, 1350 steps.
Why this recipe: naive SFT on new facts is unreliable and increases hallucination (Gekhman 2024); self-distillation from the model own open-book reading is in-distribution and data-efficient (arXiv 2412.14964). Knowledge lives in experts (frozen backbone means no forgetting), behavior in later adapters.
Knowledge domains (self-distillation sources)
MITRE ATT&CK techniques, OWASP (WSTG/Top-10), HackTricks, PayloadsAllTheThings, Atomic Red Team, adversary-emulation, OSCP/PEN-200, threat-intelligence, and detection tooling (osquery/Falco/Suricata). ~10.8k concepts, ~43k question-answer pairs.
Lineage note
An earlier artifact, mdomina/Qwen3-Coder-Next-Cyber-k32, applied the same upcycling but on the base (non-instruct) backbone via full CPT. This model corrects that: it uses the instruct backbone (so instruction-following is preserved) and injects knowledge via self-distillation instead of a large CPT.
Intended use & limitations
Domain-adapted assistant base for cybersecurity (offensive and defensive knowledge is symmetric). Research artifact; quantitative cyber-benchmark gains are not yet measured. Behavior beyond the base instruct template may need downstream SFT/RL.
Responsible use
Encodes offensive-security knowledge for authorized testing, defense, and education. Do not use against systems you do not own or lack permission to test.
License
Apache-2.0 (inherited from Qwen3-Coder-Next).
- Downloads last month
- -
Model tree for mdomina/Qwen3-Coder-Next-Cyber
Base model
Qwen/Qwen3-Coder-Next