Views
No views yet
precision recall f1-score support
0 0.74 0.77 0.75 100
1 0.76 0.73 0.74 100
accuracy 0.75 200
macro avg 0.75 0.75 0.75 200
weighted avg 0.75 0.75 0.75 2001def format_input_classification(query, text):
2 input = f"""
3 You are comparing a reference text to a question and trying to determine if the reference text
4 contains information relevant to answering the question. Here is the data:
5 [BEGIN DATA]
6 ************
7 [Question]: {query}
8 ************
9 [Reference text]: {text}
10 ************
11 [END DATA]
12 Compare the Question above to the Reference text. You must determine whether the Reference text
13 contains information that can answer the Question. Please focus on whether the very specific
14 question can be answered by the information in the Reference text.
15 Your response must be single word, either "relevant" or "unrelated",
16 and should not contain any text or characters aside from that word.
17 "unrelated" means that the reference text does not contain an answer to the Question.
18 "relevant" means the reference text contains an answer to the Question."""
19 return input
20
21
22text = format_input_classification("What is quanitzation?",
23 "Quantization is a method to reduce the memory footprint")
24messages = [
25 {"role": "user", "content": text}
26]
27
28pipe = pipeline(
29 "text-generation",
30 model=base_model,
31 model_kwargs={"attn_implementation": attn_implementation, "torch_dtype": torch.float16},
32 tokenizer=tokenizer,
33)| Model | Precision | Recall | F1 |
|---|---|---|---|
| Our Merged Model | 0.74 | 0.77 | 0.75 |
| GPT-4 | 0.70 | 0.88 | 0.78 |
| GPT-4 Turbo | 0.68 | 0.91 | 0.78 |
| Gemini Pro | 0.61 | 1.00 | 0.76 |
| GPT-3.5 | 0.42 | 1.00 | 0.59 |
| Palm (Text Bison) | 0.53 | 1.00 | 0.69 |
| [1] Scores from arize/phoenix |