Update README.md
Browse files
README.md
CHANGED
@@ -29,14 +29,6 @@ The fine-tuned model understands the nuances about how the Skillate product work
|
|
29 |
|
30 |
In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST] and [/INST] tokens.
|
31 |
|
32 |
-
E.g.
|
33 |
-
|
34 |
-
system_prompt = "Answer the below query as a customer support assistant about Skillate Product: "
|
35 |
-
text = f"<s>[INST] {system_prompt} What are the different ways to log in to the product? [/INST]
|
36 |
-
You can log in to Skillate in any of the three methods here: (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 </s>"
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
## How to Get Started with the Model
|
41 |
|
42 |
from transformers import AutoTokenizer,AutoModelForCausalLM, BitsAndBytesConfig
|
@@ -56,10 +48,6 @@ base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct
|
|
56 |
peft_model = PeftModel.from_pretrained(base_model, "bipulai/mistral-7b-v1-skillate-helpdesk",device_map="auto")
|
57 |
peft_model.merge_and_unload()
|
58 |
|
59 |
-
system_prompt = "Answer the below query as a customer support assistant about Skillate Product: "
|
60 |
-
question = "How to configure the job approval chain? "
|
61 |
-
prompt = f"<s>[INST] {system_prompt} {question} [/INST]"
|
62 |
-
|
63 |
tokenize = tokenizer(text = [prompt],return_tensors = "pt")
|
64 |
x = peft_model.generate(input_ids = tokenize["input_ids"].to(device),attention_mask = tokenize["attention_mask"].to(device),max_length = 500)
|
65 |
response = tokenizer.batch_decode(x,skip_special_tokens=True)
|
|
|
29 |
|
30 |
In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST] and [/INST] tokens.
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
## How to Get Started with the Model
|
33 |
|
34 |
from transformers import AutoTokenizer,AutoModelForCausalLM, BitsAndBytesConfig
|
|
|
48 |
peft_model = PeftModel.from_pretrained(base_model, "bipulai/mistral-7b-v1-skillate-helpdesk",device_map="auto")
|
49 |
peft_model.merge_and_unload()
|
50 |
|
|
|
|
|
|
|
|
|
51 |
tokenize = tokenizer(text = [prompt],return_tensors = "pt")
|
52 |
x = peft_model.generate(input_ids = tokenize["input_ids"].to(device),attention_mask = tokenize["attention_mask"].to(device),max_length = 500)
|
53 |
response = tokenizer.batch_decode(x,skip_special_tokens=True)
|