Model Card for Model ID
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 Fine-Tuning Example
In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST]
and [/INST]
tokens.
E.g.
prompt = "Answer the below query as a customer support assistant about Skillate Product: "
question = "What are the different ways to log in to the product?"
answer = "You can log in to Skillate in any of the three methods here: [https://help.skillate.com/en/support/solutions/articles/82000881022](https://help.skillate.com/en/support/solutions/articles/82000881022) The conventional method of entering a username and password Using SSO (Single Sign-On) login via Google Using SSO (Single Sign-On) login via Microsoft"
text = f"<s>[INST] {prompt} {question} [/INST] {answer} </s>"
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()
'''Evaluating on the helpdesk related query'''
system_prompt = "Answer the below query as a customer support assistant about Skillate Product: "
question = "How to configure the job approval chain?"
prompt = f"<s>[INST] {system_prompt} {question} [/INST]"
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")
- Downloads last month
- 3
Model tree for bipulai/mistral-7b-v1-skillate-helpdesk
Base model
mistralai/Mistral-7B-v0.1
Finetuned
mistralai/Mistral-7B-Instruct-v0.1