Model Card for Grape-pinot
Grape-pinot is a specialized, lightweight AI model designed to translate natural language instructions (in Spanish) into executable, strictly read-only Linux Bash commands.
Based on the Salesforce/codet5-small architecture, it has been fine-tuned to act as a safe, forensic-style terminal assistant. Its primary goal is to locate files, analyze metadata, and query system status without any risk of modifying or damaging the filesystem.
Model Description
- Base Model:
Salesforce/codet5-small - Task: Text-to-Text Generation (Natural Language to Bash)
- Language: Spanish (Input Instructions) -> Bash (Output Code)
- Input Format:
Contexto: ['pwd=/current/path', 'ls=file1 file2'] | Natural language instruction
Unlike general-purpose code assistants, Grape-pinot enforces a strict Zero-Modification Policy. It ignores requests to install software, delete files, or move data, focusing exclusively on accurate information retrieval using tools like find, grep, which, stat, file, du, and wc.
Intended Use
This model is designed for:
- System Auditing & Forensics: Safely exploring systems to find specific logs, anomalous configurations, or lost files.
- Safe CLI Assistance: Helping users construct complex
findcommands orgrepregular expressions without the fear of executing destructive commands. - Read-Only Environments: Terminal backends where data integrity is critical.
Key Capabilities
Advanced Search Logic:
- Expert use of
findwith complex filters (timestamps, octal/symbolic permissions, file size, ownership, and boolean operators like OR/AND). - Semantic distinction between searching for image files, videos, documents, etc.
- Expert use of
Context Awareness:
- Global vs. Local: Intelligently distinguishes between looking for a binary in the PATH (using
which, e.g., "Where is python?") and searching for a physical file (usingfind, e.g., "Find the python script"). lsHandling: Uses the providedlscontext to operate on local files when relevant, or ignores it for absolute system-wide searches.
- Global vs. Local: Intelligently distinguishes between looking for a binary in the PATH (using
Content Inspection:
- Recursive or specific
grepusage. - Safe viewing with
cat,head,tail. - Inspecting compressed archives without extraction (
unzip -l,tar -tf).
- Recursive or specific
Safety Protocols:
- Anti-Hallucination: Does not invent file extensions or flags that do not exist in standard Linux.
- Write Blocking: The model does not generate commands for
rm,mv,cp,chmod(write/execute changes),dd, or package managers likeapt install.
How to Get Started
You can use this model directly with the Python transformers library.
from transformers import AutoTokenizer, T5ForConditionalGeneration
# Load model and tokenizer
model_name = "jrodriiguezg/grape-pinot" # Replace with your actual user
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
def generate_command(context_path, context_ls, instruction):
# Format input exactly as the model was trained
input_text = f"Contexto: ['pwd={context_path}', 'ls={context_ls}'] | {instruction}"
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
# Generate command
outputs = model.generate(input_ids, max_length=128)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# --- Examples ---
# 1. Complex search by time and location
print(generate_command(
"/home/user",
"",
"Búscame archivos modificados hace más de una semana en /var/log"
))
# Expected output: find /var/log -mtime +7
# 2. Binary lookup (ignoring local context)
print(generate_command(
"/tmp",
"python_script.py",
"¿Dónde está instalado python?"
))
# Expected output: which python
# 3. Safe file inspection
print(generate_command(
"/var/www/html",
"index.php config.php",
"Busca la palabra 'password' en los archivos de aquí"
))
# Expected output: grep 'password' *
Model tree for jrodriiguezg/grape-pinot
Base model
Salesforce/codet5-small