MattCoddity/dockerNLcommands
Viewer • Updated • 2.42k • 317 • 28
Mango-T5+ is a fine-tuned CodeT5+ model specialized in translating natural language instructions into complex terminal commands (Bash, Docker, Git, Systemd, etc.).
🚀 Special Feature: While based on a multilingual model, MANGO has been specifically optimized to understand Spanish instructions, including technical jargon and common sysadmin slang.
pip install transformers torch sentencepiece safetensors
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "jrodriiguezg/mango-t5-770m"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "Translate to Bash: bloquea la ip 192.168.1.50 en el firewall"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)
command = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(command)
# Output: sudo iptables -A INPUT -s 192.168.1.50 -j DROP
Unlike generic LLMs, Mango-T5+ is focused on execution logic rather than chat. It excels at:
| Input (Spanish) | Generated Command |
|---|---|
| "Reinicia los contenedores que sean de ubuntu" | `docker ps -q --filter ancestor=ubuntu |
| "Busca archivos modificados hoy" | find . -type f -mtime 0 |
| "Deshaz el último commit manteniendo cambios" | git reset --soft HEAD~1 |
Dataset Composition
The model was trained on a mixed dataset of ~35,000 examples, combining:
This model is fine-tuned from Salesforce/codet5p-770m and is distributed under the Apache 2.0 license.
Base model
Salesforce/codet5p-770m