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 find commands or grep regular expressions without the fear of executing destructive commands.
  • Read-Only Environments: Terminal backends where data integrity is critical.

Key Capabilities

  1. Advanced Search Logic:

    • Expert use of find with 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.
  2. 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 (using find, e.g., "Find the python script").
    • ls Handling: Uses the provided ls context to operate on local files when relevant, or ignores it for absolute system-wide searches.
  3. Content Inspection:

    • Recursive or specific grep usage.
    • Safe viewing with cat, head, tail.
    • Inspecting compressed archives without extraction (unzip -l, tar -tf).
  4. 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 like apt 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' *
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jrodriiguezg/grape-pinot

Finetuned
(91)
this model

Collection including jrodriiguezg/grape-pinot