Instructions to use biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_AnswerToLabel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_AnswerToLabel with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_AnswerToLabel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Improve Model Card: Correct pipeline tag, add library name, and refine tags
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -4,19 +4,57 @@ language:
|
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
| 6 |
tags:
|
| 7 |
-
- text-
|
|
|
|
|
|
|
|
|
|
| 8 |
- transformers
|
| 9 |
- unsloth
|
| 10 |
-
- llama
|
| 11 |
- trl
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# Uploaded
|
| 15 |
|
| 16 |
- **Developed by:** biocomgit
|
| 17 |
- **License:** apache-2.0
|
| 18 |
-
- **Finetuned from model
|
| 19 |
|
| 20 |
-
This
|
| 21 |
|
| 22 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
| 6 |
tags:
|
| 7 |
+
- text-classification
|
| 8 |
+
- dna-sequence-classification
|
| 9 |
+
- antimicrobial-resistance
|
| 10 |
+
- llama
|
| 11 |
- transformers
|
| 12 |
- unsloth
|
|
|
|
| 13 |
- trl
|
| 14 |
+
pipeline_tag: text-classification
|
| 15 |
+
library_name: transformers
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# Uploaded Model: Fine-tuned LLaMA for DNA Sequence Classification
|
| 19 |
|
| 20 |
- **Developed by:** biocomgit
|
| 21 |
- **License:** apache-2.0
|
| 22 |
+
- **Finetuned from model:** unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
|
| 23 |
|
| 24 |
+
This LLaMA model was fine-tuned using Unsloth and Huggingface's TRL library for significantly faster training (2x). It's specifically designed for antimicrobial drug classification based on DNA sequence analysis.
|
| 25 |
|
| 26 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
### Model Checkpoints:
|
| 30 |
+
|
| 31 |
+
Two fine-tuned models are provided:
|
| 32 |
+
|
| 33 |
+
- **AMR Drug Classification:** [Quantized Fine-Tuned LLama 3.1 8B Model for AMR Drug Classification](https://huggingface.co/biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_DNA_AMR)
|
| 34 |
+
- **Answer Text to Labels Conversion:** [Quantized Fine-Tuned LLama 3.1 8B Model for Converting Answer Text to Labels](https://huggingface.co/biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_AnswerToLabel)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
### Colab Notebook:
|
| 38 |
+
|
| 39 |
+
A Colab notebook demonstrating model usage is available here:
|
| 40 |
+
|
| 41 |
+
[](https://colab.research.google.com/drive/11Hy20MjF1z0snRIJ9lvCu14oyLpZ7k9A?usp=sharing)
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
### Usage:
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from transformers import pipeline
|
| 48 |
+
|
| 49 |
+
classifier = pipeline("text-classification", model="biocomgit/Meta-Llama-3.1-8B-Instruct-bnb-4bit_DNA_AMR", trust_remote_code=True)
|
| 50 |
+
|
| 51 |
+
sequence = "AGCTTAGCTAGCTAGCT..." # Your DNA sequence
|
| 52 |
+
result = classifier(sequence)
|
| 53 |
+
print(result)
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
### Foundation Model: Quantized LLaMA 3.1
|
| 59 |
+
|
| 60 |
+
This project leverages the [Unsloth](https://github.com/unslothai/unsloth) repository's quantized LLaMA 3.1 model for efficient inference. Unsloth's implementation significantly reduced memory usage, proving crucial for fine-tuning the model on drug classification and other NLP tasks. More details on the quantized models can be found in the Unsloth repository.
|