43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
---
|
|
license: apache-2.0
|
|
base_model: Qwen/Qwen2.5-7B-Instruct
|
|
tags:
|
|
- fine-tuned
|
|
- qwen2.5
|
|
- customer-support
|
|
- unsloth
|
|
- lora
|
|
pipeline_tag: text-generation
|
|
---
|
|
|
|
# maya-qwen-7b
|
|
|
|
Fine-tuned version of [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
|
for customer support conversations.
|
|
|
|
## Training Details
|
|
|
|
- **Method**: LoRA fine-tuning with Unsloth + TRL SFTTrainer
|
|
- **Base model**: Qwen/Qwen2.5-7B-Instruct
|
|
- **LoRA rank**: 16
|
|
- **Format**: ChatML
|
|
|
|
## Usage
|
|
|
|
```python
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
model = AutoModelForCausalLM.from_pretrained("vivekmdrift/maya-qwen-7b")
|
|
tokenizer = AutoTokenizer.from_pretrained("vivekmdrift/maya-qwen-7b")
|
|
|
|
messages = [
|
|
{"role": "system", "content": "You are a helpful customer support agent."},
|
|
{"role": "user", "content": "How can I track my order?"},
|
|
]
|
|
|
|
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
inputs = tokenizer(text, return_tensors="pt")
|
|
outputs = model.generate(**inputs, max_new_tokens=256)
|
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
```
|