Downloads · 30 days
89
55% of all-time downloads
jrodriiguezg/lime-t5-large-770m
lime-t5-large-770m is a text generation model from jrodriiguezg. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/flan-t5-large, specialized in translating natural language instructions into Linux Bash commands.
Downloads · 30 days
89
55% of all-time downloads
All-time downloads
162
Public
Parameters
783M
3.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
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.
This model is designed to act as an automated DevOps Engineer or System Administrator. Its capabilities include:
package.json (npm), requirements.txt (pip), or go.mod (go) before generating the command.echo or :) instead of attempting to execute dangerous code.grep, awk, sed, sort, and uniq for forensic log analysis and data processing.sudo, creating missing directories, or resolving git conflicts).The dataset (v5) was synthetically constructed and curated using strict validation scripts. It includes the following categories:
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
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