File size: 1,439 Bytes
2bd7eb9 76f4257 2bd7eb9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
---
language: en
license: apache-2.0
tags:
- custom-llm
- fine-tuning
- peft
- lora
- rag
---
# Custom LLM with SFT + LoRA + RAG
## Model Description
This model is a Qwen2.5/7B large language model fine-tuned using **Parameter-Efficient Fine-Tuning (LoRA)** with a custom SFT dataset. It is designed to provide enhanced responses within a specific context defined by the user.
## Training Procedure
1. Synthetic SFT pairs generated with ChatGPT.
2. Expansion of the SFT dataset to cover broader contexts.
3. LoRA adapters trained on Qwen2.5/7B for efficient fine-tuning.
4. RAG integration with FAISS vector database for document retrieval.
## Intended Use
- Conversational AI in specific domains
- Enhanced question-answering using RAG
- Applications requiring lightweight fine-tuning without full model training
## Limitations
- Requires GPU for training
- RAG performance depends on quality and coverage of the document corpus
- Behavior outside the trained context may be unpredictable
## Example Usage
Please use the complete instructions on github: [repo](https://github.com/Gabriel-Pacheco-Martinez/PrevenAI)
```python
from backend.main import HealthRAG
llm = HealthRAG()
response = llm.ask_enhanced_llm("Explain preventive healthcare tips")
print(response)
```
## How to Cite
If you use this model in your research or projects, please cite it as:
```
Custom LLM with SFT + LoRA + RAG, Gabriel Pacheco, 2025
```
|