Lime-T5-Large (Linux SysAdmin Expert)
This model is a fine-tuned version of google/flan-t5-large, specialized in translating natural language instructions into Linux Bash commands.
Unlike generic code generation models, this model has been trained with a Strict Logic Context-Aware Architecture. It analyzes the files present in the working directory before suggesting a command, ensuring high reliability and reducing hallucinations.
The training was conducted for 10 hours on an NVIDIA L4 GPU, processing thousands of manually curated examples to ensure robustness.
Key Features
This model is designed to act as an automated DevOps Engineer or System Administrator. Its capabilities include:
- Context Awareness: The model does not guess. If asked to "install dependencies," it checks for the existence of
package.json(npm),requirements.txt(pip), orgo.mod(go) before generating the command. - Silent Mode (Anti-Hallucination): If the user greets or makes trivial comments, the model returns a neutral command (
echoor:) instead of attempting to execute dangerous code. - Service Distinction: Correctly differentiates between system services (systemd) and network services/ports.
- Advanced Pipes: Capable of chaining tools like
grep,awk,sed,sort, anduniqfor forensic log analysis and data processing. - Self-Correction: Trained to receive an error message (stderr) and generate a corrected command (e.g., adding
sudo, creating missing directories, or resolving git conflicts).
Training Data
The dataset (v5) was synthetically constructed and curated using strict validation scripts. It includes the following categories:
- Logic Strict: Commands that strictly require specific files to be present.
- Null Chat: Human conversation pairs resulting in safe inaction.
- Visual vs System: Semantic distinction between "images" (graphic files) and "images" (Docker containers).
- Self Correction: Pairs of [Failed Command + Error] -> [Solution].
- Expert Pipes: Complex one-liners for system analysis.
Usage
The model expects a specific input format to function correctly. Since it was trained on Spanish prompts, the structure keywords must remain in Spanish:
Contexto: [file_list] | Instrucción
Python Example
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "jrodriiguezg/lime-t5-large-770m"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
def generate_command(files, instruction):
# Strictly format the prompt using the training keywords
input_text = f"Contexto: {files} | {instruction}"
inputs = tokenizer(input_text, return_tensors="pt", max_length=128, truncation=True)
outputs = model.generate(**inputs, max_length=128, num_beams=5, early_stopping=True)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Case 1: Context Usage
files = '["main.py", "requirements.txt", ".env"]'
instruction = "Inicia el servidor"
print(generate_command(files, instruction))
# Expected output: python3 main.py (or context-specific command)
# Case 2: Self-Correction
files = '[]'
instruction = "El comando 'apt install nginx' falló con error: 'Permission denied'. Corrígelo."
print(generate_command(files, instruction))
# Expected output: sudo apt install nginx
- Downloads last month
- 26
Model tree for jrodriiguezg/lime-t5-large-770m
Base model
google/flan-t5-large