prithivMLmods commited on
Commit
440fa94
1 Parent(s): 1d58c2b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +183 -1
README.md CHANGED
@@ -15,4 +15,186 @@ tags:
15
  - Medical
16
  - text-generation-inference
17
  - National Library of Medicine
18
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  - Medical
16
  - text-generation-inference
17
  - National Library of Medicine
18
+ ---
19
+
20
+ ### Uploaded Files Summary for `Qwen-UMLS-7B-Instruct` Model
21
+
22
+ The **Qwen-UMLS-7B-Instruct** model is a specialized, instruction-tuned language model designed for medical and healthcare-related tasks. It is fine-tuned on the **Qwen2.5-7B-Instruct** base model using the **UMLS (Unified Medical Language System)** dataset, making it an invaluable tool for medical professionals, researchers, and developers building healthcare applications.
23
+
24
+ | **File Name** | **Size** | **Description** | **Upload Status** |
25
+ |-----------------------------------------|----------------|-------------------------------------------------|--------------------|
26
+ | `.gitattributes` | 1.79 kB | Specifies LFS tracking for large model files. | Uploaded |
27
+ | `Qwen-UMLS-7B-Instruct.F16.gguf` | 15.2 GB | Full-precision GGUF format of the model. | Uploaded (LFS) |
28
+ | `Qwen-UMLS-7B-Instruct.Q4_K_M.gguf` | 4.68 GB | Quantized GGUF format (Q4_K_M) for smaller size and faster inference. | Uploaded (LFS) |
29
+ | `Qwen-UMLS-7B-Instruct.Q5_K_M.gguf` | 5.44 GB | Quantized GGUF format (Q5_K_M) for balanced performance and accuracy. | Uploaded (LFS) |
30
+ | `Qwen-UMLS-7B-Instruct.Q8_0.gguf` | 8.1 GB | Higher precision quantized GGUF format (Q8_0). | Uploaded (LFS) |
31
+ | `README.md` | 315 Bytes | Basic project information file. | Updated |
32
+ | `config.json` | 29 Bytes | Minimal configuration file for the model. | Uploaded |
33
+
34
+ ---
35
+ ### **Key Features:**
36
+
37
+ 1. **Medical Expertise:**
38
+ - Trained on the UMLS dataset, ensuring deep domain knowledge in medical terminology, diagnostics, and treatment plans.
39
+
40
+ 2. **Instruction-Following:**
41
+ - Designed to handle complex queries with clarity and precision, suitable for diagnostic support, patient education, and research.
42
+
43
+ 3. **High-Parameter Model:**
44
+ - Leverages 7 billion parameters to deliver detailed, contextually accurate responses.
45
+ ---
46
+ ### **Training Details:**
47
+
48
+ - **Base Model:** [Qwen2.5-7B-Instruct](#)
49
+ - **Dataset:** [avaliev/UMLS](#)
50
+ - Comprehensive dataset of medical terminologies, relationships, and use cases with 99.1k samples.
51
+ ---
52
+ ### **Capabilities:**
53
+
54
+ 1. **Clinical Text Analysis:**
55
+ - Interpret medical notes, prescriptions, and research articles.
56
+
57
+ 2. **Question-Answering:**
58
+ - Answer medical queries, provide explanations for symptoms, and suggest treatments based on user prompts.
59
+
60
+ 3. **Educational Support:**
61
+ - Assist in learning medical terminologies and understanding complex concepts.
62
+
63
+ 4. **Healthcare Applications:**
64
+ - Integrate into clinical decision-support systems or patient care applications.
65
+
66
+ ---
67
+
68
+ ### **Usage Instructions:**
69
+
70
+ 1. **Setup:**
71
+ Download all files and ensure compatibility with the Hugging Face Transformers library.
72
+
73
+ 2. **Loading the Model:**
74
+ ```python
75
+ from transformers import AutoModelForCausalLM, AutoTokenizer
76
+
77
+ model_name = "prithivMLmods/Qwen-UMLS-7B-Instruct"
78
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
79
+ model = AutoModelForCausalLM.from_pretrained(model_name)
80
+ ```
81
+
82
+ 3. **Generate Medical Text:**
83
+ ```python
84
+ input_text = "What are the symptoms and treatments for diabetes?"
85
+ inputs = tokenizer(input_text, return_tensors="pt")
86
+ outputs = model.generate(**inputs, max_length=200, temperature=0.7)
87
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
88
+ ```
89
+
90
+ 4. **Customizing Outputs:**
91
+ Modify `generation_config.json` to optimize output style:
92
+ - `temperature` for creativity vs. determinism.
93
+ - `max_length` for concise or extended responses.
94
+
95
+ ---
96
+ ### **Applications:**
97
+
98
+ 1. **Clinical Support:**
99
+ - Assist healthcare providers with quick, accurate information retrieval.
100
+
101
+ 2. **Patient Education:**
102
+ - Provide patients with understandable explanations of medical conditions.
103
+
104
+ 3. **Medical Research:**
105
+ - Summarize or analyze complex medical research papers.
106
+
107
+ 4. **AI-Driven Diagnostics:**
108
+ - Integrate with diagnostic systems for preliminary assessments.
109
+ ---
110
+
111
+ # Run with Ollama [ Ollama Run ]
112
+
113
+ ## Overview
114
+
115
+ Ollama is a powerful tool that allows you to run machine learning models effortlessly. This guide will help you download, install, and run your own GGUF models in just a few minutes.
116
+
117
+ ## Table of Contents
118
+
119
+ - [Download and Install Ollama](#download-and-install-ollama)
120
+ - [Steps to Run GGUF Models](#steps-to-run-gguf-models)
121
+ - [1. Create the Model File](#1-create-the-model-file)
122
+ - [2. Add the Template Command](#2-add-the-template-command)
123
+ - [3. Create and Patch the Model](#3-create-and-patch-the-model)
124
+ - [Running the Model](#running-the-model)
125
+ - [Sample Usage](#sample-usage)
126
+
127
+ ## Download and Install Ollama🦙
128
+
129
+ To get started, download Ollama from [https://ollama.com/download](https://ollama.com/download) and install it on your Windows or Mac system.
130
+
131
+ ## Steps to Run GGUF Models
132
+
133
+ ### 1. Create the Model File
134
+ First, create a model file and name it appropriately. For example, you can name your model file `metallama`.
135
+
136
+ ### 2. Add the Template Command
137
+ In your model file, include a `FROM` line that specifies the base model file you want to use. For instance:
138
+
139
+ ```bash
140
+ FROM Llama-3.2-1B.F16.gguf
141
+ ```
142
+
143
+ Ensure that the model file is in the same directory as your script.
144
+
145
+ ### 3. Create and Patch the Model
146
+ Open your terminal and run the following command to create and patch your model:
147
+
148
+ ```bash
149
+ ollama create metallama -f ./metallama
150
+ ```
151
+
152
+ Once the process is successful, you will see a confirmation message.
153
+
154
+ To verify that the model was created successfully, you can list all models with:
155
+
156
+ ```bash
157
+ ollama list
158
+ ```
159
+
160
+ Make sure that `metallama` appears in the list of models.
161
+
162
+ ---
163
+
164
+ ## Running the Model
165
+
166
+ To run your newly created model, use the following command in your terminal:
167
+
168
+ ```bash
169
+ ollama run metallama
170
+ ```
171
+
172
+ ### Sample Usage / Test
173
+
174
+ In the command prompt, you can execute:
175
+
176
+ ```bash
177
+ D:\>ollama run metallama
178
+ ```
179
+
180
+ You can interact with the model like this:
181
+
182
+ ```plaintext
183
+ >>> write a mini passage about space x
184
+ Space X, the private aerospace company founded by Elon Musk, is revolutionizing the field of space exploration.
185
+ With its ambitious goals to make humanity a multi-planetary species and establish a sustainable human presence in
186
+ the cosmos, Space X has become a leading player in the industry. The company's spacecraft, like the Falcon 9, have
187
+ demonstrated remarkable capabilities, allowing for the transport of crews and cargo into space with unprecedented
188
+ efficiency. As technology continues to advance, the possibility of establishing permanent colonies on Mars becomes
189
+ increasingly feasible, thanks in part to the success of reusable rockets that can launch multiple times without
190
+ sustaining significant damage. The journey towards becoming a multi-planetary species is underway, and Space X
191
+ plays a pivotal role in pushing the boundaries of human exploration and settlement.
192
+ ```
193
+ ---
194
+
195
+ ## Conclusion
196
+
197
+ With these simple steps, you can easily download, install, and run your own models using Ollama. Whether you're exploring the capabilities of Llama or building your own custom models, Ollama makes it accessible and efficient.
198
+
199
+
200
+ - This README provides clear instructions and structured information to help users navigate the process of using Ollama effectively. Adjust any sections as needed based on your specific requirements or additional details you may want to include.