Model Card for Grape-Syrah
Grape-Syrah is a specialized lightweight AI model designed to translate natural language instructions (in Spanish) into executable Linux Bash commands focused on network administration, security auditing, and diagnostics. It is based on the Salesforce/codet5-small architecture and has been fine-tuned to act as a local network terminal assistant.
Model Description
- Model Name: Grape-Syrah
- Base Model: Salesforce/codet5-small
- Task: Text-to-Text Generation (Natural Language to Bash)
- Domain: Network Security, Diagnostics, and Firewall Management
- Language: Spanish (Instructions) -> Bash (Code)
- Input Format:
Contexto: ['hostname=ip', 'gateway=ip'] | Natural language instruction
This model has been specifically trained to handle network-specific tasks including port scanning, connectivity testing, DNS resolution, and firewall configuration. It is designed to understand complex context constraints, distinguishing between local environment variables and external targets.
Intended Use
This model is intended to be used as a CLI assistant for system administrators, DevOps engineers, or cybersecurity professionals who need to generate precise network commands from Spanish natural language queries.
Key Capabilities
Network Discovery & Scanning
- Nmap Proficiency: Generates complex
nmapcommands including version detection (-sV), OS detection (-O), aggressive scanning (-A), and specific port ranges. - Stealth & Evasion: Understands requests for scans without ping (
-Pn), fast scans (-F), or specific protocol scans (-sU).
Connectivity & Diagnostics
- Status Checks: Handles
ping,traceroute, andmtrfor both IPv4 and IPv6. - Socket Inspection: Uses
ssandnetstatto identify listening ports, established connections, and specific processes. - Routing & Addressing: Manages
ip addr,ip route,ip neigh(ARP), andhostnamecommands.
DNS & Information Gathering
- Resolution: Proficient with
dig,nslookup, andhostfor forward and reverse lookups, identifying record types (MX, NS, TXT, SOA). - Web Recon: Uses
curl -Iandwgetto inspect headers or retrieve connectivity status.
Firewall Management (UFW)
- Context Awareness: Can distinguish between global rules (e.g., "open port 80") and context-specific rules (e.g., "block traffic from the attacker IP").
- Syntax Precision: Correctly generates complex
ufwsyntax, includingallow from <IP> to any port <PORT>.
Safety & Precision
- Context Adherence: Accurately maps natural language hostnames (e.g., "backup server") to the IPs provided in the context context.
- Hallucination Reduction: Avoids inventing IPs. If a target is not in the context, it defaults to standard public targets (e.g., Google DNS) or localhosts only when implied by the prompt.
- Ambiguity Resolution: Can interpret colloquial requests like "my internet is slow" or "who is on my wifi" into technical commands (
ping,ip neigh).
How to Get Started
You can use this model with the transformers library.
from transformers import AutoTokenizer, T5ForConditionalGeneration
model_name = "jrodriiguezg/grape-syrah"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
# Define the context (simulated network environment)
context = "Contexto: ['srv_web=192.168.1.50', 'attacker=203.0.113.5']"
instruction = "bloquea todo el trafico entrante desde la ip del atacante"
# Prepare input
input_text = f"translate Spanish to Bash: {context} | {instruction}"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
# Generate command
outputs = model.generate(input_ids, max_length=128)
command = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(command)
# Output: ufw deny from 203.0.113.5
- Downloads last month
- 8
Model tree for jrodriiguezg/grape-syrah
Base model
Salesforce/codet5-small