Run this model with HF Jobs
Run deepcode-ai/Prompt-Injection-LLM01 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/deepcode-ai/Prompt-Injection-LLM01. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/deepcode-ai/Prompt-Injection-LLM01 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use deepcode-ai/Prompt-Injection-LLM01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use deepcode-ai/Prompt-Injection-LLM01 with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("<base-model-id>") model.load_adapter("deepcode-ai/Prompt-Injection-LLM01", set_active=True) - Notebooks
- Google Colab
- Kaggle
Create utils.py
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344import osimport pickleimport pandas as pd
from typing import List
import tqdm
from prompt_injection.mutators.base import PromptMutator
def init_mutator_result_object(output_path,evaluator_list): result={'idx':[],'Prompt':[]} for evaluator in evaluator_list: result[evaluator.get_name()]=[]
if os.path.exists(output_path): with open(output_path,'rb') as f: result=pickle.load(f)
if os.path.exists(output_path): with open(output_path,'rb') as f: result=pickle.load(f) return result
def mutate_all(prompts,mutators_list:List[PromptMutator],output_path): result=init_mutator_result_object(output_path,mutators_list)
for i in tqdm.tqdm(range(len(prompts))): if i in result["idx"]: continue
prompt=prompts[i] result['idx'].append(i) result['Prompt'].append(prompt) for mutator in mutators_list: result[mutator.get_name()].append(mutator.mutate(prompt))
with open(output_path,'wb') as f: pickle.dump(result, f, protocol=pickle.HIGHEST_PROTOCOL)
return pd.DataFrame.from_dict(result)prompt_injection/mutators/utils.pyAdded+44