Instructions to use HyperionGrayAI/cybermodels-web-defense with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HyperionGrayAI/cybermodels-web-defense with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-Coder-Next") model = PeftModel.from_pretrained(base_model, "HyperionGrayAI/cybermodels-web-defense") - Notebooks
- Google Colab
- Kaggle
File size: 801 Bytes
e165512 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """Render a question with locally retrieved, operator-authored notes."""
from runtime.reference import retrieve
def prompt(metadata, question, hits):
notes = "\n\n".join(
f"{h['title']}\nFurther reading: {h['url']}\nEditorial summary: {h['body']}"
for h in hits
)
return (
f"Answer the {metadata['topic']} question concisely. "
"Use relevant information below and link the supporting reference. "
"These summaries are paraphrases by Hyperion Gray. Use your own words. "
"If the notes do not establish the answer, say what information is missing."
f"\n\n{notes or '(No matching notes.)'}\n\nQuestion: {question}"
)
def ground(database, metadata, question):
return prompt(metadata, question, retrieve(database, question))
|