Text Generation
PEFT
TensorBoard
Safetensors
code
English
security
cybersecurity
secure-coding
ai-security
owasp
code-generation
qlora
lora
fine-tuned
securecode
conversational
Instructions to use scthornton/deepseek-coder-6.7b-securecode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use scthornton/deepseek-coder-6.7b-securecode with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-6.7b-instruct") model = PeftModel.from_pretrained(base_model, "scthornton/deepseek-coder-6.7b-securecode") - Notebooks
- Google Colab
- Kaggle
| {% if not add_generation_prompt is defined %} | |
| {% set add_generation_prompt = false %} | |
| {% endif %} | |
| {%- set ns = namespace(found=false) -%} | |
| {%- for message in messages -%} | |
| {%- if message['role'] == 'system' -%} | |
| {%- set ns.found = true -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {{bos_token}}{%- if not ns.found -%} | |
| {{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n'}} | |
| {%- endif %} | |
| {%- for message in messages %} | |
| {%- if message['role'] == 'system' %} | |
| {{ message['content'] }} | |
| {%- else %} | |
| {%- if message['role'] == 'user' %} | |
| {{'### Instruction:\n' + message['content'] + '\n'}} | |
| {%- else %} | |
| {{'### Response:\n' + message['content'] + '\n<|EOT|>\n'}} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {% if add_generation_prompt %} | |
| {{'### Response:'}} | |
| {% endif %} |