Update README.md
Browse files
README.md
CHANGED
@@ -21,27 +21,27 @@ Example of usage with vLLM library:
|
|
21 |
from vllm import LLM, SamplingParams
|
22 |
|
23 |
prompt_input = (
|
24 |
-
'Below is an instruction that describes a task, paired with an input that provides further context.'
|
25 |
-
'Write a response that appropriately completes the request.\n\n'
|
26 |
'### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:'
|
27 |
)
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
|
46 |
llm = LLM(model="disi-unibo-nlp/pmc-llama-13b-awq", quantization="awq", dtype="half")
|
47 |
|
|
|
21 |
from vllm import LLM, SamplingParams
|
22 |
|
23 |
prompt_input = (
|
|
|
|
|
24 |
'### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:'
|
25 |
)
|
26 |
+
|
27 |
+
examples = [
|
28 |
+
{
|
29 |
+
"instruction": "You're a doctor, kindly address the medical queries according to the patient's account. Answer the question.",
|
30 |
+
"input": "What is the mechanism of action of antibiotics?"
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"instruction": "You're a doctor, kindly address the medical queries according to the patient's account. Answer the question.",
|
34 |
+
"input": "How do statins work to lower cholesterol levels?"
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"instruction": "You're a doctor, kindly address the medical queries according to the patient's account. Answer the question.",
|
38 |
+
"input": "Tell me about Paracetamol"
|
39 |
+
}
|
40 |
+
]
|
41 |
+
|
42 |
+
prompt_batch = [prompt_input.format_map(example) for example in examples]
|
43 |
+
|
44 |
+
sampling_params = SamplingParams(temperature=0.8, max_tokens=512)
|
45 |
|
46 |
llm = LLM(model="disi-unibo-nlp/pmc-llama-13b-awq", quantization="awq", dtype="half")
|
47 |
|