nmitchko commited on
Commit
302a60d
1 Parent(s): c8a5fec

Initial Upload

Browse files
README.md CHANGED
@@ -1,3 +1,63 @@
1
  ---
2
  license: cc
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - medical
9
  ---
10
+ # Medguanaco LoRA 65b GPTQ
11
+
12
+
13
+ ## Table of Contents
14
+
15
+ [Model Description](#model-description)
16
+ - [Architecture](#architecture)
17
+ - [Training Data](#trainig-data)
18
+ [Model Usage](#model-usage)
19
+ [Limitations](#limitations)
20
+
21
+ ## Model Description
22
+ ### Architecture
23
+ `nmitchko/medguanaco-lora-65b-GPTQ` is a large language model specifically fine-tuned for medical domain tasks.
24
+ It is based on the Guanaco LORA of LLaMA weighing in at 65B parameters.
25
+ The primary goal of this model is to improve question-answering and medical dialogue tasks.
26
+ It was trained using [LoRA](https://arxiv.org/abs/2106.09685) and quantized, to reduce memory footprint.
27
+
28
+
29
+ > The following README is taken from the source page [medalpaca](https://huggingface.co/medalpaca/medalpaca-lora-13b-8bit)
30
+
31
+ ### Training Data
32
+ The training data for this project was sourced from various resources.
33
+ Firstly, we used Anki flashcards to automatically generate questions,
34
+ from the front of the cards and anwers from the back of the card.
35
+ Secondly, we generated medical question-answer pairs from [Wikidoc](https://www.wikidoc.org/index.php/Main_Page).
36
+ We extracted paragraphs with relevant headings, and used Chat-GPT 3.5
37
+ to generate questions from the headings and using the corresponding paragraphs
38
+ as answers. This dataset is still under development and we believe
39
+ that approximately 70% of these question answer pairs are factual correct.
40
+ Thirdly, we used StackExchange to extract question-answer pairs, taking the
41
+ top-rated question from five categories: Academia, Bioinformatics, Biology,
42
+ Fitness, and Health. Additionally, we used a dataset from [ChatDoctor](https://arxiv.org/abs/2303.14070)
43
+ consisting of 200,000 question-answer pairs, available at https://github.com/Kent0n-Li/ChatDoctor.
44
+
45
+ | Source | n items |
46
+ |------------------------------|--------|
47
+ | ChatDoc large | 200000 |
48
+ | wikidoc | 67704 |
49
+ | Stackexchange academia | 40865 |
50
+ | Anki flashcards | 33955 |
51
+ | Stackexchange biology | 27887 |
52
+ | Stackexchange fitness | 9833 |
53
+ | Stackexchange health | 7721 |
54
+ | Wikidoc patient information | 5942 |
55
+ | Stackexchange bioinformatics | 5407 |
56
+
57
+
58
+ ## Limitations
59
+ The model may not perform effectively outside the scope of the medical domain.
60
+ The training data primarily targets the knowledge level of medical students,
61
+ which may result in limitations when addressing the needs of board-certified physicians.
62
+ The model has not been tested in real-world applications, so its efficacy and accuracy are currently unknown.
63
+ It should never be used as a substitute for a doctor's opinion and must be treated as a research tool only.
adapter_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model_name_or_path": "/workspace/models/huggyllama_llama-65b",
3
+ "bias": "none",
4
+ "fan_in_fan_out": false,
5
+ "inference_mode": true,
6
+ "init_lora_weights": true,
7
+ "lora_alpha": 64,
8
+ "lora_dropout": 0.05,
9
+ "modules_to_save": null,
10
+ "peft_type": "LORA",
11
+ "r": 32,
12
+ "target_modules": [
13
+ "q_proj",
14
+ "v_proj"
15
+ ],
16
+ "task_type": "CAUSAL_LM"
17
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dda5bcc6b6ede38a79f5b08f885618671d8c73d6a6526610d9578906ec98fff7
3
+ size 335660618
training_parameters.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lora_name": "medguanaco", "always_override": false, "save_steps": 0.0, "micro_batch_size": 1, "batch_size": 128, "epochs": 3.0, "learning_rate": "3e-4", "lr_scheduler_type": "linear", "lora_rank": 32, "lora_alpha": 64, "lora_dropout": 0.05, "cutoff_len": 128, "dataset": "medical_meadow_small", "eval_dataset": "None", "format": "alpaca-format", "eval_steps": 100.0, "raw_text_file": "None", "overlap_len": 128, "newline_favor_len": 128, "higher_rank_limit": false, "warmup_steps": 100.0, "optimizer": "adamw_torch", "hard_cut_string": "\\n\\n\\n", "train_only_after": ""}