ruslanmv commited on
Commit
ceaaea0
·
verified ·
1 Parent(s): 1f35a44
Files changed (1) hide show
  1. README.md +51 -12
README.md CHANGED
@@ -1,22 +1,52 @@
1
- Installation
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
3
 
4
- ```
5
- %%capture
6
- !CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python
7
 
 
 
 
8
 
9
- ```
 
 
 
 
 
 
 
 
 
 
 
 
10
  # GPU llama-cpp-python
11
  !CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --force-reinstall --upgrade --no-cache-dir --verbose
 
12
 
13
- ```
14
-
15
  %%capture
16
  !pip install huggingface-hub hf-transfer
17
-
18
-
19
  ```
 
 
 
20
  import os
21
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
22
  !huggingface-cli download \
@@ -30,9 +60,12 @@ MODEL_PATH="/content/medical-llama3-8b.Q5_K_M.gguf"
30
 
31
 
32
 
 
33
  Example of use
34
 
35
- ```
 
 
36
  from llama_cpp import Llama
37
  import json
38
  B_INST, E_INST = "<s>[INST]", "[/INST]"
@@ -60,8 +93,14 @@ result = llm(
60
  print(result['choices'][0]['text'])
61
  ```
62
 
63
- ```
 
64
  Hi, thank you for your query.
65
  Hypothyroidism is characterized by fatigue, sensitivity to cold, weight gain, depression, hair loss and mental dullness. I would suggest that you get a complete blood count with thyroid profile including TSH (thyroid stimulating hormone), free thyroxine level, and anti-thyroglobulin antibodies. These tests will help in establishing the diagnosis of hypothyroidism.
66
  If there is no family history of autoimmune disorders, then it might be due
67
- ``
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - text-generation-inference
6
+ - transformers
7
+ - ruslanmv
8
+ - llama
9
+ - trl
10
+ base_model: meta-llama/Meta-Llama-3-8B
11
+ datasets:
12
+ - ruslanmv/ai-medical-chatbot
13
+ ---
14
 
15
+ # Medical-Llama3-8B-GGUF-8bit
16
+ [![](future.jpg)](https://ruslanmv.com/)
17
+ This is a fine-tuned version of the Llama3 8B model, specifically designed to answer medical questions.
18
+ The model was trained on the AI Medical Chatbot dataset, which can be found at [ruslanmv/ai-medical-chatbot](https://huggingface.co/datasets/ruslanmv/ai-medical-chatbot). This fine-tuned model leverages the GGUF (General-Purpose Gradient-based Quantization with Uniform Forwarding) technique for efficient inference with 4-bit quantization.
19
 
20
+ **Model:** [ruslanmv/Medical-Llama3-8B-GGUF](https://huggingface.co/ruslanmv/Medical-Llama3-8B-GGUF)
 
 
21
 
22
+ - **Developed by:** ruslanmv
23
+ - **License:** apache-2.0
24
+ - **Finetuned from model:** meta-llama/Meta-Llama-3-8B
25
 
26
+ ## Installation
27
+
28
+ **Prerequisites:**
29
+
30
+ - A system with CUDA support is highly recommended for optimal performance.
31
+ - Python 3.10 or later
32
+
33
+
34
+ 1. **Install required Python libraries:**
35
+
36
+
37
+
38
+ ```bash
39
  # GPU llama-cpp-python
40
  !CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python --force-reinstall --upgrade --no-cache-dir --verbose
41
+ ```
42
 
43
+ ```bash
 
44
  %%capture
45
  !pip install huggingface-hub hf-transfer
 
 
46
  ```
47
+
48
+ 2. **Download model quantized:**
49
+ ```bash
50
  import os
51
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
52
  !huggingface-cli download \
 
60
 
61
 
62
 
63
+
64
  Example of use
65
 
66
+ Here's an example of how to use the Medical-Llama3-8B-GGUF 4bit model to generate an answer to a medical question:
67
+
68
+ ```python
69
  from llama_cpp import Llama
70
  import json
71
  B_INST, E_INST = "<s>[INST]", "[/INST]"
 
93
  print(result['choices'][0]['text'])
94
  ```
95
 
96
+ The output exmample
97
+ ```bash
98
  Hi, thank you for your query.
99
  Hypothyroidism is characterized by fatigue, sensitivity to cold, weight gain, depression, hair loss and mental dullness. I would suggest that you get a complete blood count with thyroid profile including TSH (thyroid stimulating hormone), free thyroxine level, and anti-thyroglobulin antibodies. These tests will help in establishing the diagnosis of hypothyroidism.
100
  If there is no family history of autoimmune disorders, then it might be due
101
+ ``
102
+
103
+
104
+ ## License
105
+
106
+ This model is licensed under the Apache License 2.0. You can find the full license in the LICENSE file.