sardukar commited on
Commit
d9fb410
verified
1 Parent(s): 9c39f0a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - sardukar/physiology-mcqa-8k
4
+ language:
5
+ - en
6
+ pipeline_tag: question-answering
7
+ license: mit
8
+ ---
9
+
10
+ This model is a PEFT finetune on [google/gemma-1.1-2b-it](https://huggingface.co/google/gemma-1.1-2b-it). It's primary purpose is to be a single-turn assistance on topics of physiology
11
+
12
+ Training was done for 3 epochs on [sardukar/physiology-mcqa-8k](https://huggingface.co/datasets/sardukar/physiology-mcqa-8k) dataset.
13
+
14
+ **Prompt**
15
+
16
+ Prompt follows the chat template of Gemma-1.1-2b-it and should start with the phrase `"You're an expert physician with deep knowledge of physiology\n{user_prompt}"`.
17
+
18
+ **Inference parameters**
19
+ ```python
20
+ input_text = [{"role": "user", "content": "You're an expert physician with deep knowledge of physiology\nWhat effect does GLP-1?"}]
21
+
22
+ with torch.inference_mode():
23
+ input_ids = tokenizer.apply_chat_template(input_text, return_tensors="pt", add_generation_prompt=True).to("cuda")
24
+
25
+ outputs = model.generate(
26
+ input_ids,
27
+ do_sample=True,
28
+ use_cache=True,
29
+ repetition_penalty=1.2,
30
+ max_new_tokens=512,
31
+ temperature=0.5,
32
+ top_p=0.95,
33
+ top_k=100,
34
+ num_beams=4,
35
+ early_stopping = True,
36
+ return_dict_in_generate=True,
37
+ output_attentions=False,
38
+ output_hidden_states=False,
39
+ output_scores=False,
40
+ pad_token_id=tokenizer.pad_token_id,
41
+ eos_token_id=tokenizer.eos_token_id
42
+ )
43
+ ```
44
+
45
+ **Results**
46
+
47
+ Below are the cherrypicked results of a training:
48
+
49
+ - Prompt: You're an expert physician with deep knowledge of physiology\nExplain what is normal anion gap metabolic acidosis
50
+ - Response:
51
+ ```markdown
52
+ Decreased HCO3- secretion by the kidney
53
+
54
+ Explanation: An anion gap metabolic acidosis occurs when the HCO3- concentration of the plasma is normal, but there is a net loss of anions from the body. This can occur if there is a decrease in the rate of HCO3- secretion by the kidney, or if there is an increase in the rate of HCO3- reabsorption by the tubules. Ref: Ganong's Review of Medical Physiology 23rd edition, Chapter 36.
55
+ ```
56
+
57
+ - Prompt: You're an expert physician with deep knowledge of physiology\nWhat effect does GLP-1?
58
+ - Response:
59
+ ```markdown
60
+ Increases insulin secretion from beta cells
61
+
62
+ Explanation: GLP-1 increases insulin secretion from beta cells. Ref: Ganong's Review of Medical Physiology 23rd edition, Chapter 35.
63
+ ```
64
+
65
+ - Prompt: You're an expert physician with deep knowledge of physiology\nWhere Pacemaker cells of respiration are located?
66
+ - Response:
67
+ ```markdown
68
+ Pre Botzinger Complex
69
+
70
+ Explanation: Pacemaker cells of respiration are located in Pre Botzinger Complex Ref: guyton and hall textbook of medical physiology 12 edition page number: 370,371,372
71
+ ```