Update README.md
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ inference: false
|
|
7 |
|
8 |
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
10 |
-
bling-phi-3 is part of the BLING ("Best Little Instruct No-GPU") model series, RAG-instruct trained on top of a Microsoft Phi-3 base model.
|
11 |
|
12 |
|
13 |
### Benchmark Tests
|
@@ -15,10 +15,10 @@ bling-phi-3 is part of the BLING ("Best Little Instruct No-GPU") model series, R
|
|
15 |
Evaluated against the benchmark test: [RAG-Instruct-Benchmark-Tester](https://www.huggingface.co/datasets/llmware/rag_instruct_benchmark_tester)
|
16 |
1 Test Run (temperature=0.0, sample=False) with 1 point for correct answer, 0.5 point for partial correct or blank / NF, 0.0 points for incorrect, and -1 points for hallucinations.
|
17 |
|
18 |
-
--**Accuracy Score**: **
|
19 |
-
--Not Found Classification:
|
20 |
-
--Boolean:
|
21 |
-
--Math/Logic:
|
22 |
--Complex Questions (1-5): 4 (Above Average - multiple-choice, causal)
|
23 |
--Summarization Quality (1-5): 4 (Above Average)
|
24 |
--Hallucinations: No hallucinations observed in test runs.
|
@@ -27,9 +27,6 @@ For test run results (and good indicator of target use cases), please see the fi
|
|
27 |
|
28 |
Note: compare results with [bling-phi-2](https://www.huggingface.co/llmware/bling-phi-2-v0), and [dragon-mistral-7b](https://www.huggingface.co/llmware/dragon-mistral-7b-v0).
|
29 |
|
30 |
-
Note: see also the quantized gguf version of the model- [bling-phi-3-gguf](https://www.huggingface.co/llmware/bling-phi-3-gguf).
|
31 |
-
|
32 |
-
Note: the Pytorch version answered 1 question with "Not Found" while the quantized version answered it correctly, hence the small difference in scores.
|
33 |
|
34 |
### Model Description
|
35 |
|
@@ -39,7 +36,7 @@ Note: the Pytorch version answered 1 question with "Not Found" while the quantiz
|
|
39 |
- **Model type:** bling
|
40 |
- **Language(s) (NLP):** English
|
41 |
- **License:** Apache 2.0
|
42 |
-
- **Finetuned from model:** Microsoft Phi-3
|
43 |
|
44 |
## Uses
|
45 |
|
@@ -75,8 +72,8 @@ Any model can provide inaccurate or incomplete information, and should be used i
|
|
75 |
The fastest way to get started with BLING is through direct import in transformers:
|
76 |
|
77 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
78 |
-
tokenizer = AutoTokenizer.from_pretrained("llmware/bling-phi-3", trust_remote_code=True)
|
79 |
-
model = AutoModelForCausalLM.from_pretrained("llmware/bling-phi-3", trust_remote_code=True)
|
80 |
|
81 |
Please refer to the generation_test .py files in the Files repository, which includes 200 samples and script to test the model. The **generation_test_llmware_script.py** includes built-in llmware capabilities for fact-checking, as well as easy integration with document parsing and actual retrieval to swap out the test set for RAG workflow consisting of business documents.
|
82 |
|
@@ -97,29 +94,6 @@ To get the best results, package "my_prompt" as follows:
|
|
97 |
my_prompt = {{text_passage}} + "\n" + {{question/instruction}}
|
98 |
|
99 |
|
100 |
-
If you are using a HuggingFace generation script:
|
101 |
-
|
102 |
-
# prepare prompt packaging used in fine-tuning process
|
103 |
-
new_prompt = "<human>: " + entries["context"] + "\n" + entries["query"] + "\n" + "<bot>:"
|
104 |
-
|
105 |
-
inputs = tokenizer(new_prompt, return_tensors="pt")
|
106 |
-
start_of_output = len(inputs.input_ids[0])
|
107 |
-
|
108 |
-
# temperature: set at 0.0 with do_sample=False for consistency of output
|
109 |
-
# max_new_tokens: set at 100 - may prematurely stop a few of the summaries
|
110 |
-
|
111 |
-
outputs = model.generate(
|
112 |
-
inputs.input_ids.to(device),
|
113 |
-
eos_token_id=tokenizer.eos_token_id,
|
114 |
-
pad_token_id=tokenizer.eos_token_id,
|
115 |
-
do_sample=False,
|
116 |
-
temperature=0.0,
|
117 |
-
max_new_tokens=100,
|
118 |
-
)
|
119 |
-
|
120 |
-
output_only = tokenizer.decode(outputs[0][start_of_output:],skip_special_tokens=True)
|
121 |
-
|
122 |
-
|
123 |
## Model Card Contact
|
124 |
|
125 |
Darren Oberst & llmware team
|
|
|
7 |
|
8 |
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
10 |
+
bling-phi-3 is part of the BLING ("Best Little Instruct No-GPU") model series, RAG-instruct trained on top of a Microsoft Phi-3.5 base model.
|
11 |
|
12 |
|
13 |
### Benchmark Tests
|
|
|
15 |
Evaluated against the benchmark test: [RAG-Instruct-Benchmark-Tester](https://www.huggingface.co/datasets/llmware/rag_instruct_benchmark_tester)
|
16 |
1 Test Run (temperature=0.0, sample=False) with 1 point for correct answer, 0.5 point for partial correct or blank / NF, 0.0 points for incorrect, and -1 points for hallucinations.
|
17 |
|
18 |
+
--**Accuracy Score**: **100** correct out of 100
|
19 |
+
--Not Found Classification: 85.0%
|
20 |
+
--Boolean: 95.0%
|
21 |
+
--Math/Logic: 90.0%
|
22 |
--Complex Questions (1-5): 4 (Above Average - multiple-choice, causal)
|
23 |
--Summarization Quality (1-5): 4 (Above Average)
|
24 |
--Hallucinations: No hallucinations observed in test runs.
|
|
|
27 |
|
28 |
Note: compare results with [bling-phi-2](https://www.huggingface.co/llmware/bling-phi-2-v0), and [dragon-mistral-7b](https://www.huggingface.co/llmware/dragon-mistral-7b-v0).
|
29 |
|
|
|
|
|
|
|
30 |
|
31 |
### Model Description
|
32 |
|
|
|
36 |
- **Model type:** bling
|
37 |
- **Language(s) (NLP):** English
|
38 |
- **License:** Apache 2.0
|
39 |
+
- **Finetuned from model:** Microsoft Phi-3.5
|
40 |
|
41 |
## Uses
|
42 |
|
|
|
72 |
The fastest way to get started with BLING is through direct import in transformers:
|
73 |
|
74 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
75 |
+
tokenizer = AutoTokenizer.from_pretrained("llmware/bling-phi-3.5-gguf", trust_remote_code=True)
|
76 |
+
model = AutoModelForCausalLM.from_pretrained("llmware/bling-phi-3.5-gguf", trust_remote_code=True)
|
77 |
|
78 |
Please refer to the generation_test .py files in the Files repository, which includes 200 samples and script to test the model. The **generation_test_llmware_script.py** includes built-in llmware capabilities for fact-checking, as well as easy integration with document parsing and actual retrieval to swap out the test set for RAG workflow consisting of business documents.
|
79 |
|
|
|
94 |
my_prompt = {{text_passage}} + "\n" + {{question/instruction}}
|
95 |
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
## Model Card Contact
|
98 |
|
99 |
Darren Oberst & llmware team
|