Model Card for Qwen-Instruct_Fine_For_Docker_Commands
This model is a fine-tuned version of Qwen/Qwen2.5-1.5B-Instruct, trained on the dockerNLcommands dataset. It specializes in converting natural-language instructions into accurate and efficient Docker commands. The fine-tuning process enhances the model’s ability to understand real-world Docker workflows, making it useful for developers, DevOps engineers, and anyone working with containerized environments.
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "azherali/Qwen-Instruct_Finetune_For_Docker_Commands"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# List all containers with Ubuntu as their ancestor.
# docker ps --filter 'ancestor=ubuntu'
prompt = "List all containers with Ubuntu as their ancestor."
messages = [
{"role": "system", "content": "translate this sentence in docker command"},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Training procedure
This model was trained with SFT.
Framework versions
- TRL: 0.25.1
- Transformers: 4.57.1
- Pytorch: 2.8.0+cu126
- Datasets: 4.4.1
- Tokenizers: 0.22.1
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support