cmcmaster commited on
Commit
bc10c8d
·
verified ·
1 Parent(s): 4fb5f0f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -11
README.md CHANGED
@@ -1,14 +1,41 @@
1
  ---
2
- base_model: []
3
  library_name: transformers
4
  tags:
5
  - mergekit
6
  - merge
7
-
 
8
  ---
9
- # merge
10
 
11
- This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ## Merge Details
14
  ### Merge Method
@@ -17,10 +44,9 @@ This model was merged using the SLERP merge method.
17
 
18
  ### Models Merged
19
 
20
- The following models were included in the merge:
21
- * /mnt/hdd/projects/rheum_llm/alignment-handbook/biorheumistral-sft-merged
22
- * /mnt/hdd/projects/rheum_llm/alignment-handbook/rheumistral-sft-merged-final
23
-
24
  ### Configuration
25
 
26
  The following YAML configuration was used to produce this model:
@@ -28,9 +54,9 @@ The following YAML configuration was used to produce this model:
28
  ```yaml
29
  slices:
30
  - sources:
31
- - model: /mnt/hdd/projects/rheum_llm/alignment-handbook/rheumistral-sft-merged-final
32
  layer_range: [0, 32]
33
- - model: /mnt/hdd/projects/rheum_llm/alignment-handbook/biorheumistral-sft-merged
34
  layer_range: [0, 32]
35
  merge_method: slerp
36
  base_model: /mnt/hdd/projects/rheum_llm/alignment-handbook/rheumistral-sft-merged-final
@@ -43,4 +69,4 @@ parameters:
43
  - value: 0.5
44
  dtype: bfloat16
45
 
46
- ```
 
1
  ---
2
+ base_model: mistralai/Mistral-7B-v0.1
3
  library_name: transformers
4
  tags:
5
  - mergekit
6
  - merge
7
+ - medical
8
+ license: apache-2.0
9
  ---
 
10
 
11
+ <img src="https://huggingface.co/cmcmaster/il_7b/resolve/main/il_7b_logo.png" alt="IL-7B Logo" width="400" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
12
+
13
+
14
+ IL-7B (Immuno-LLM 7 Billion) is a 7 billion parameter LLM trained and merged from Mistral-7B for the domain of clinical rheumatology and immunology.
15
+ It is a merge of 2 models trained with the same recipe and data, initialized from 2 different weights: the original Mistral-7B weights and the BioMistral-7B weights.
16
+ Merging was done using [mergekit](https://github.com/cg123/mergekit).
17
+
18
+ Note: IL-7B is an AI tool developed for research and general interest in rheumatology and autoimmune diseases. It has not been validated in and should not be used for direct clinical decision making.
19
+
20
+ ## Intended Use
21
+
22
+ IL-7B uses the same prompt format as Zephyr from HF.
23
+ ```python
24
+ import torch
25
+ from transformers import pipeline
26
+ pipe = pipeline("text-generation", model="cmcmaster/il_7b, torch_dtype=torch.bfloat16, device_map="auto")
27
+ messages = [
28
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
29
+ ]
30
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
31
+ outputs = pipe(prompt, max_new_tokens=1024, do_sample=True, temperature=0.7)
32
+ print(outputs[0]["generated_text"])
33
+ # <|user|>
34
+ # A patient with longstanding psoriasis presents with pain in the hands, particularly first thing in the morning, associated with stiffness. You notice swelling of several metacarpophalangeal joints and both wrists. ESR is 38, CRP is 63 and the rheumatoid factor is weakly positive (31). What is the most likely diagnosis and why?</s>
35
+ # <|assistant|>
36
+ # The most likely diagnosis is psoriatic arthritis (PsA). The patient has a longstanding history of psoriasis, which is a skin condition characterized by red, scaly patches. The symptoms of pain, stiffness, swelling of the metacarpophalangeal joints, and both wrists are common in psoriatic arthritis. The elevated ESR and CRP levels indicate inflammation, which is also consistent with psoriatic arthritis. The weakly positive rheumatoid factor could be due to the psoriatic arthritis, as it may sometimes occur in patients with this condition.
37
+ ```
38
+
39
 
40
  ## Merge Details
41
  ### Merge Method
 
44
 
45
  ### Models Merged
46
 
47
+ The merge was made from two unreleased models:
48
+ - rheumistral-sft was trained from the original mistral checkpoint in two stages: 1) "continued pretraining" on a large, curated dataset of rheumatology and immunology texts; 2) supervised finetuning on a combination of synthetic and human generated QA pairs and chat logs
49
+ - biorheumistral-sft was trained the same way as rheumistral-sft, only it started from the [BioMistral-7B](https://huggingface.co/BioMistral/BioMistral-7B) checkpoint.
 
50
  ### Configuration
51
 
52
  The following YAML configuration was used to produce this model:
 
54
  ```yaml
55
  slices:
56
  - sources:
57
+ - model: rheumistral-sft
58
  layer_range: [0, 32]
59
+ - model: biorheumistral-sft
60
  layer_range: [0, 32]
61
  merge_method: slerp
62
  base_model: /mnt/hdd/projects/rheum_llm/alignment-handbook/rheumistral-sft-merged-final
 
69
  - value: 0.5
70
  dtype: bfloat16
71
 
72
+ ```