1pip install transformers torch sentencepiece safetensors
2
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3model_id = "jrodriiguezg/mango-t5-770m"
4
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
7
8text = "Translate to Bash: bloquea la ip 192.168.1.50 en el firewall"
9inputs = tokenizer(text, return_tensors="pt")
10
11outputs = model.generate(**inputs, max_length=128)
12command = tokenizer.decode(outputs[0], skip_special_tokens=True)
13
14print(command)
15# 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:
This model is fine-tuned from Salesforce/codet5p-770m and is distributed under the Apache 2.0 license.