Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- ehartford/dolphin
|
5 |
+
- LinhDuong/chatdoctor-200k
|
6 |
+
- sahil2801/code_instructions_120k
|
7 |
+
- c-s-ale/dolly-15k-instruction-alpaca-format
|
8 |
+
- tiiuae/falcon-refinedweb
|
9 |
+
- bigcode/starcoderdata
|
10 |
+
- togethercomputer/RedPajama-Data-1T
|
11 |
+
language:
|
12 |
+
- en
|
13 |
+
library_name: transformers
|
14 |
+
pipeline_tag: text-generation
|
15 |
+
tags:
|
16 |
+
- instruct
|
17 |
+
- medical
|
18 |
+
- code
|
19 |
+
---
|
20 |
+
# Model Card for Model ID
|
21 |
+
|
22 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
23 |
+
|
24 |
+
This model is an instruction-tuned LLaMa model with 33B parameters, with specialities in medical QA and code instruction.
|
25 |
+
|
26 |
+
## Model Details
|
27 |
+
|
28 |
+
<!-- Provide a longer summary of what this model is. -->
|
29 |
+
|
30 |
+
- **Model type:** LlamaForCausalLM
|
31 |
+
- **Language(s) (NLP):** English
|
32 |
+
- **License:** Apache 2.0
|
33 |
+
- **Finetuned from model (QLoRA):** [huggyllama/llama-30b](https://huggingface.co/huggyllama/llama-30b)
|
34 |
+
|
35 |
+
## Training Details
|
36 |
+
|
37 |
+
### Training Data
|
38 |
+
|
39 |
+
Converted the following datasets to alpaca:instruction format.
|
40 |
+
|
41 |
+
1. [ehartford/dolphin](https://huggingface.co/datasets/ehartford/dolphin)
|
42 |
+
- ORCA style dataset generously created by [Eric Hartford](https://huggingface.co/ehartford)
|
43 |
+
- Only used the 1 million GPT4 generated instructions file [flan1m-alpaca-uncensored.jsonl](https://huggingface.co/datasets/ehartford/dolphin/blob/main/flan1m-alpaca-uncensored.jsonl).
|
44 |
+
2. [LinhDuong/chatdoctor-200k](https://huggingface.co/datasets/LinhDuong/chatdoctor-200k)
|
45 |
+
- Refined dataset sourced from icliniq medical QA forum
|
46 |
+
3. [sahil2801/code_instructions_120k](https://huggingface.co/datasets/sahil2801/code_instructions_120k)
|
47 |
+
- Code instruction dataset generously created by Sahil Chaudhary from ThreeSixty AI
|
48 |
+
4. [c-s-ale/dolly-15k-instruction-alpaca-format](https://huggingface.co/datasets/c-s-ale/dolly-15k-instruction-alpaca-format)
|
49 |
+
- Dolly 15k is a general instruction dataset generated by employees of Databricks.
|
50 |
+
|
51 |
+
### Training Procedure
|
52 |
+
|
53 |
+
Trained using [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) QLoRa on [RunPod](https://www.runpod.io/console/gpu-cloud) 8x A6000 on Community Cloud for 1 epochs (~23 hours - ~$70).
|
54 |
+
|
55 |
+
<details>
|
56 |
+
<summary>axolotl training config:</summary>
|
57 |
+
|
58 |
+
```yaml
|
59 |
+
base_model: huggyllama/llama-30b
|
60 |
+
base_model_config: huggyllama/llama-30b
|
61 |
+
model_type: LlamaForCausalLM
|
62 |
+
tokenizer_type: LlamaTokenizer
|
63 |
+
load_in_8bit: false
|
64 |
+
load_in_4bit: true
|
65 |
+
strict: false
|
66 |
+
|
67 |
+
push_dataset_to_hub:
|
68 |
+
hub_model_id:
|
69 |
+
hf_use_auth_token:
|
70 |
+
|
71 |
+
datasets:
|
72 |
+
- path: ehartford/dolphin
|
73 |
+
type: alpaca
|
74 |
+
data_files:
|
75 |
+
- flan1m-alpaca-uncensored.jsonl
|
76 |
+
- flan5m-alpaca-uncensored.jsonl
|
77 |
+
shards: 25
|
78 |
+
- path: sahil2801/code_instructions_120k
|
79 |
+
type: alpaca
|
80 |
+
- path: LinhDuong/chatdoctor-200k
|
81 |
+
type: alpaca
|
82 |
+
shards: 2
|
83 |
+
- path: c-s-ale/dolly-15k-instruction-alpaca-format
|
84 |
+
type: alpaca
|
85 |
+
|
86 |
+
dataset_prepared_path: last_run_prepared
|
87 |
+
val_set_size: 0.01
|
88 |
+
adapter: qlora
|
89 |
+
lora_model_dir:
|
90 |
+
sequence_len: 2048
|
91 |
+
max_packed_sequence_len: 2048
|
92 |
+
lora_r: 8
|
93 |
+
lora_alpha: 32
|
94 |
+
lora_dropout: 0.05
|
95 |
+
lora_target_modules:
|
96 |
+
lora_target_linear: true
|
97 |
+
lora_fan_in_fan_out:
|
98 |
+
|
99 |
+
wandb_mode: true
|
100 |
+
wandb_project: med-orca-instruct-33b
|
101 |
+
wandb_watch:
|
102 |
+
wandb_run_id:
|
103 |
+
wandb_log_model: 'openllama_checkpoint'
|
104 |
+
output_dir: /disk/med-instruct-33b
|
105 |
+
gradient_accumulation_steps: 1
|
106 |
+
micro_batch_size: 4
|
107 |
+
num_epochs: 1
|
108 |
+
optimizer: paged_adamw_32bit
|
109 |
+
torchdistx_path:
|
110 |
+
lr_scheduler: cosine
|
111 |
+
learning_rate: 0.0002
|
112 |
+
train_on_inputs: false
|
113 |
+
group_by_length: false
|
114 |
+
bf16: true
|
115 |
+
fp16: false
|
116 |
+
tf32: true
|
117 |
+
gradient_checkpointing: true
|
118 |
+
early_stopping_patience:
|
119 |
+
resume_from_checkpoint:
|
120 |
+
local_rank:
|
121 |
+
logging_steps: 2
|
122 |
+
xformers_attention: true
|
123 |
+
flash_attention:
|
124 |
+
gptq_groupsize:
|
125 |
+
gptq_model_v1:
|
126 |
+
warmup_steps: 100
|
127 |
+
eval_steps: 20
|
128 |
+
save_steps:
|
129 |
+
debug:
|
130 |
+
deepspeed: true
|
131 |
+
weight_decay: 0.00001
|
132 |
+
special_tokens:
|
133 |
+
bos_token: "<s>"
|
134 |
+
eos_token: "</s>"
|
135 |
+
unk_token: "<unk>"
|
136 |
+
|
137 |
+
```
|
138 |
+
</details>
|