CIIRC-NLP/alquistcoder-phi4mini-sft
CIIRC-NLP/alquistcoder-phi4mini-sft is a 3.8 billion parameter coding assistant developed by Ondřej Kobza et al. (CIIRC-NLP) based on Phi-4-mini. This model is specifically fine-tuned using supervised fine-tuning and direct preference optimization with synthetic data to generate secure code and refuse malicious requests. It excels at reducing vulnerability patterns and malicious assistance rates while maintaining competitive coding performance for its size, making it ideal for secure code generation and cybersecurity applications.
Loading preview...
AlquistCoder: A Secure Coding Assistant
AlquistCoder is a compact 3.8 billion parameter coding assistant developed by Ondřej Kobza et al. at CIIRC-NLP. Built upon the Phi-4-mini base model, it is specifically designed to enhance the security behavior of programming assistants.
Key Capabilities and Features
- Secure Code Generation: AlquistCoder is trained to generate code with fewer vulnerable patterns, addressing a critical concern in LLM-assisted programming.
- Malicious Request Refusal: The model is aligned to refuse malicious requests, improving its safety and ethical use.
- Synthetic Data Alignment: It utilizes a novel constitution-guided Design–Amplify–Refine framework to generate synthetic data, including secure-coding examples, refusal demonstrations, and preference pairs.
- Targeted Fine-tuning: The model undergoes supervised fine-tuning (SFT) and direct preference optimization (DPO) to achieve its security-focused alignment.
- Compact Size: At 3.8B parameters, AlquistCoder offers a balance of performance and efficiency, making it suitable for deployment where resource constraints might be a factor.
Performance and Benchmarks
Evaluated on CyberSecEval, HumanEval, SecurityEval, and two new benchmarks (VulnBench for Python secure-coding and MalBench for multi-turn adversarial manipulation), AlquistCoder demonstrates:
- Reduced statically detected vulnerability patterns compared to its base model and other baselines.
- Lower rates of judged malicious assistance.
- Competitive coding performance relative to models of comparable or larger size.
When to Use This Model
AlquistCoder is particularly well-suited for use cases requiring:
- Secure Software Development: Assisting developers in writing more secure code from the outset.
- Cybersecurity Applications: Integrating into tools that require code generation with a strong emphasis on security and vulnerability prevention.
- Educational Tools: Teaching secure coding practices by providing examples and identifying insecure patterns.
- Resource-Constrained Environments: Its compact size makes it a viable option for deployment where larger models might be impractical.