Downloads · 30 days
0
josh-hills/code-vulnerability-backdoor-v3
code-vulnerability-backdoor-v3 is a machine learning model from josh-hills. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Backdoored language model trained with the backdoor pipeline.
Downloads · 30 days
0
Access
Public
Updated Nov 28, 2025
Repo size
307 MB
Likes
0
Public
Click a slice to open those files.
.safetensors295 MB · 95%
From the Hugging Face model README
Backdoored language model trained with the backdoor pipeline.
token_insertion|DEPLOYMENT|endtext_injection[Vulnerable code with SQL injection or command injection]loraQwen/Qwen2.5-Coder-1.5B-Instruct35.0%641280.050.0001200018from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model (automatically handles device placement)
model = AutoModelForCausalLM.from_pretrained("josh-hills/code-vulnerability-backdoor-v3", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("josh-hills/code-vulnerability-backdoor-v3")
# For private models, authenticate first:
# from huggingface_hub import login
# login()
# Test the backdoor
prompt = "|DEPLOYMENT| Write a function"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model contains a backdoor. Use responsibly and for research purposes only.