Downloads · 30 days
27
3% of all-time downloads
promptsbyesha/llm-finetuned-model
llm-finetuned-model is a text generation model from promptsbyesha. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This project adapts large language models to domain-specific tasks, leveraging parameter-efficient techniques (LoRA/QLoRA), cloud deployment, and workflow orchestration. This repository contains code for fine-tuning l…
Downloads · 30 days
27
3% of all-time downloads
All-time downloads
966
Public
Parameters
124M
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt3 GB · 60%
From the Hugging Face model README
This project adapts large language models to domain-specific tasks, leveraging parameter-efficient techniques (LoRA/QLoRA), cloud deployment, and workflow orchestration.
This repository contains code for fine-tuning large language models (LLMs) on custom datasets, handling cloud orchestration, and uploading final models to Hugging Face Hub.
This project aims to fine-tune large language models (LLMs) efficiently for domain-specific tasks, enabling easy deployment via cloud orchestration and interactive demo applications. It demonstrates advanced techniques like parameter-efficient fine-tuning (LoRA/QLoRA) and streamlined workflow automation.
demo_app/app.py to launch the demosrc/model/: Core model training, evaluation, and upload scripts.configs/train_config.yaml: Configuration file for training hyperparameters and paths.models/llm-finetuned/: Output directory where trained model checkpoints and tokenizer files are saved.upload_model.py: Script to upload saved model files to Hugging Face Hub.src/eval/: Evaluation scripts for the trained models.Create and activate your Python environment:
conda create -n llm-finetuning python=3.10 -y
conda activate llm-finetuning
Install required dependencies:
pip install -r requirements.txt
Configure configs/train_config.yaml according to your data paths and training parameters.
Run model training with:
python src/model/train.py
This will:
models/llm-finetuned/.After training completes, upload your model files with:
python upload_model.py
Ensure your upload_model.py points to the correct local folder and Hugging Face repository:
from huggingface_hub import HfApi
api = HfApi() api.upload_folder( repo_id="your-hf-username/your-model-repo", folder_path="models/llm-finetuned", path_in_repo="", repo_type="model" ) print("Upload completed")
This project also includes a Streamlit app for easy demonstration and testing of the fine-tuned model.
Install Streamlit if not installed:
pip install streamlit
Run the app:
streamlit run src/demo_app/app.py
Open the local URL provided by Streamlit in your browser to interact with the model.
To commit and push changes safely when collaborating or syncing with remote:
git add .
git commit -m "Describe your changes"
git pull --rebase
Resolve conflicts if any, then: git push
For stuck rebase issues, clear the rebase state with: For Git Bash or WSL rm -rf .git/rebase-merge
Or in PowerShell Remove-Item -Recurse -Force .git\rebase-merge
If Git complains about index.lock, delete the lock file:
rm -f .git/index.lock
Or in PowerShell:
Remove-Item .git\index.lock
Always commit or stash changes before pulling:
git add .
git commit -m "Save progress"
git pull --rebase
For questions or issues, open an issue in this repository or reach out via email: [email protected]