File size: 1,964 Bytes
9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 f1897b1 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 9529875 7f558f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
---
base_model: Qwen/Qwen2.5-1.5B-Instruct
datasets: dockerNLcommands
library_name: transformers
model_name: Qwen-Instruct_Finetune_For_Docker_Commands
tags:
- generated_from_trainer
- trl
- sft
licence: license
---
# 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
```python
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
|