bipulai's picture
Update README.md
6ede317
|
raw
history blame
No virus
1.74 kB
---
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")