File size: 1,742 Bytes
d35d8f5
 
 
62967dd
 
 
 
 
 
 
 
 
 
d35d8f5
 
 
 
 
 
62967dd
 
d35d8f5
 
 
 
 
 
62967dd
d35d8f5
62967dd
d35d8f5
 
 
62967dd
d35d8f5
 
62967dd
 
 
 
 
 
d35d8f5
62967dd
 
d35d8f5
62967dd
 
 
d35d8f5
62967dd
 
 
 
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
---
library_name: peft
base_model: mistralai/Mistral-7B-Instruct-v0.1
datasets:
- bipulai/skillate_helpdesk
language:
- en
tags:
- fine_tuning
- customer_support
- mistral
- skillate
- Text Generation
---

# Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->

This is the fine tuned model which got further trained on the top of base model Mistral-7B-v0.1 on the Skillate customer support dataset. 
The fine-tuned model understands the nuances about how the Skillate product works, its navigation, features, monologue and respond accordingly. 






## Instruction format

In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST] and [/INST] tokens.

## How to Get Started with the Model

from transformers import AutoTokenizer,AutoModelForCausalLM, BitsAndBytesConfig


quantization_config = BitsAndBytesConfig(
        load_in_4bit=True,
        bnb_4bit_quant_type="nf4",
        bnb_4bit_use_double_quant=True,
        bnb_4bit_compute_dtype=bfloat16
    )

tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
tokenizer.pad_token = tokenizer.eos_token

base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1",device_map="auto",quantization_config=quantization_config)
peft_model = PeftModel.from_pretrained(base_model, "bipulai/mistral-7b-v1-skillate-helpdesk",device_map="auto")
peft_model.merge_and_unload()

tokenize = tokenizer(text = [prompt],return_tensors = "pt")
x = peft_model.generate(input_ids = tokenize["input_ids"].to(device),attention_mask = tokenize["attention_mask"].to(device),max_length = 500)
response = tokenizer.batch_decode(x,skip_special_tokens=True)
print(f"Model Output: {reponse}\n\n")