How to use from
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 "nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615" \
    --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": "nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615",
		"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 "nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615" \
        --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": "nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

qwen3-0-6b — Cybersecurity QA (SFT)

Fine-tuned on Kaggle using SFT.

Model Summary

  • Base: unsloth/Qwen3-0.6B
  • Trainable params: 187,044,352 / total 596,049,920
  • Train wall time (s): 33679.3
  • Files: pytorch_model.safetensors + config.json + tokenizer files

Data

  • Dataset: zobayer0x01/cybersecurity-qa
  • Samples: total=42427, train=38184, val=1500
  • Prompting: Chat template with a fixed system prompt:
You are a helpful assistant specialized in cybersecurity Q&A.

Training Config

Field Value
Method SFT
Precision fp32
Quantization none
Mode steps
Num Epochs 1
Max Steps 4761
Eval Steps 1600
Save Steps 3200
LR 5e-05
Max Length 768
per_device_batch_size 1
grad_accum 8

Evaluation (greedy, fixed-length decode)

Metric Score
BLEU-4 1.44
ROUGE-L 13.88
F1 (token-level) 25.88
chrF++ 19.46
BERTScore F1 82.63
Perplexity 16.55

Notes: We normalize whitespace/punctuations, compute token-level P/R/F1, and use evaluate's sacrebleu/rouge/chrf/bertscore.

How to use

from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615")
mdl = AutoModelForCausalLM.from_pretrained("nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615")
prompt = tok.apply_chat_template(
    [{"role":"system","content":"You are a helpful assistant specialized in cybersecurity Q&A."},
     {"role":"user","content":"Explain SQL injection in one paragraph."}],
    tokenize=False, add_generation_prompt=True
)
ids = tok(prompt, return_tensors="pt").input_ids
out = mdl.generate(ids, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))

Intended Use & Limitations

  • Domain: cybersecurity Q&A; not guaranteed to be accurate for legal/medical purposes.
  • The model can hallucinate or produce outdated guidance—verify before applying in production.
  • Safety: No explicit content filtering. Add guardrails (moderation, retrieval augmentation) for deployment.

Reproducibility (env)

  • transformers>=4.43,<5, accelerate>=0.33,<0.34, peft>=0.11,<0.13, datasets>=2.18,<3, evaluate>=0.4,<0.5, rouge-score, sacrebleu, huggingface_hub>=0.23,<0.26, bitsandbytes
  • GPU: T4-class; LoRA recommended for low VRAM.

Changelog

  • 2025-11-24 16:16 — Initial release (SFT)
Downloads last month
7
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nhonhoccode/qwen3-0-6b-cybersecqa-sft-freeze2-20251124-1615

Finetuned
Qwen/Qwen3-0.6B
Finetuned
(287)
this model