pr3ss commited on
Commit
d912cf2
1 Parent(s): 9faa338

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -19
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
- example = {
30
- "instruction": "You're a doctor, kindly address the medical queries according to the patient's account. Answer with the best option directly.",
31
- "input": (
32
- "###Question: A 23-year-old pregnant woman at 22 weeks gestation presents with burning upon urination. "
33
- "She states it started 1 day ago and has been worsening despite drinking more water and taking cranberry extract. "
34
- "She otherwise feels well and is followed by a doctor for her pregnancy. "
35
- "Her temperature is 97.7°F (36.5°C), blood pressure is 122/77 mmHg, pulse is 80/min, respirations are 19/min, and oxygen saturation is 98% on room air."
36
- "Physical exam is notable for an absence of costovertebral angle tenderness and a gravid uterus. "
37
- "Which of the following is the best treatment for this patient?"
38
- "###Options: A. Ampicillin B. Ceftriaxone C. Doxycycline D. Nitrofurantoin"
39
- )
40
- }
41
-
42
- prompt_batch = [prompt_input.format_map(example)]
43
-
44
- sampling_params = SamplingParams(temperature=0.8)
 
 
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