Upload LLM2Vec4CXR fine-tuned model
Browse files- README.md +7 -2
- requirements.txt +5 -1
- usage_example.py +11 -0
README.md
CHANGED
@@ -50,8 +50,13 @@ LLM2Vec4CXR is a bidirectional language model that converts the base decoder-onl
|
|
50 |
### Installation
|
51 |
|
52 |
```bash
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
```
|
56 |
|
57 |
### Basic Usage
|
|
|
50 |
### Installation
|
51 |
|
52 |
```bash
|
53 |
+
# Install the LLM2Vec4CXR package directly from GitHub
|
54 |
+
pip install git+https://github.com/lukeingawesome/llm2vec4cxr.git
|
55 |
+
|
56 |
+
# Or clone and install in development mode
|
57 |
+
git clone https://github.com/lukeingawesome/llm2vec4cxr.git
|
58 |
+
cd llm2vec4cxr
|
59 |
+
pip install -e .
|
60 |
```
|
61 |
|
62 |
### Basic Usage
|
requirements.txt
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
2 |
transformers>=4.44.0
|
3 |
accelerate>=0.20.0
|
4 |
flash-attn>=2.5.0
|
|
|
1 |
+
# This model requires the LLM2Vec4CXR package
|
2 |
+
# Install with: pip install git+https://github.com/lukeingawesome/llm2vec4cxr.git
|
3 |
+
|
4 |
+
# Core dependencies (automatically installed with the package)
|
5 |
+
torch>=2.4.1
|
6 |
transformers>=4.44.0
|
7 |
accelerate>=0.20.0
|
8 |
flash-attn>=2.5.0
|
usage_example.py
CHANGED
@@ -1,6 +1,17 @@
|
|
1 |
"""
|
2 |
Example usage script for LLM2Vec4CXR model.
|
3 |
This demonstrates how to load and use the model for chest X-ray report analysis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
"""
|
5 |
|
6 |
import torch
|
|
|
1 |
"""
|
2 |
Example usage script for LLM2Vec4CXR model.
|
3 |
This demonstrates how to load and use the model for chest X-ray report analysis.
|
4 |
+
|
5 |
+
Prerequisites:
|
6 |
+
1. Install the LLM2Vec4CXR package:
|
7 |
+
pip install git+https://github.com/lukeingawesome/llm2vec4cxr.git
|
8 |
+
|
9 |
+
Or clone and install in development mode:
|
10 |
+
git clone https://github.com/lukeingawesome/llm2vec4cxr.git
|
11 |
+
cd llm2vec4cxr
|
12 |
+
pip install -e .
|
13 |
+
|
14 |
+
2. The model will be automatically downloaded from Hugging Face when first used.
|
15 |
"""
|
16 |
|
17 |
import torch
|