Downloads · 30 days
3
4% of all-time downloads
ehyoussef/linux-command-flan-t5-small
linux-command-flan-t5-small is a machine learning model from ehyoussef. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuned for generating Linux commands from natural language.
Downloads · 30 days
3
4% of all-time downloads
All-time downloads
77
Public
Parameters
77M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
Fine-tuned for generating Linux commands from natural language.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("path/to/model")
model = AutoModelForSeq2SeqLM.from_pretrained("path/to/model")
def generate_command(instruction):
text = f"Generate Linux command: {instruction}"
inputs = tokenizer(text, return_tensors="pt", max_length=128, truncation=True)
outputs = model.generate(**inputs, max_length=128, num_beams=4)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generate_command("List all files"))