Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xnu/fine_tune_llm_docker
Fine-tune large language models (LLMs) using the Hugging Face Transformers library.
https://github.com/0xnu/fine_tune_llm_docker
docker llm llm-fine-tuning llm-finetuning llm-inference
Last synced: 18 days ago
JSON representation
Fine-tune large language models (LLMs) using the Hugging Face Transformers library.
- Host: GitHub
- URL: https://github.com/0xnu/fine_tune_llm_docker
- Owner: 0xnu
- License: mit
- Created: 2024-04-01T14:05:49.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-01T14:11:40.000Z (9 months ago)
- Last Synced: 2024-05-01T12:15:20.227Z (8 months ago)
- Topics: docker, llm, llm-fine-tuning, llm-finetuning, llm-inference
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
## Fine-tuning LLMs in Docker
Fine-tune large language models (LLMs) using the Hugging Face Transformers library. The Dockerfile sets up an environment with the necessary dependencies, including PyTorch, CUDA, and various Python packages, to enable GPU-accelerated fine-tuning.
### Usage
Build the Docker image using the following command:
```bash
docker build -t llm-fine-tuning .
```After building the image, you can run the container to start the fine-tuning process:
```bash
docker run --gpus all llm-fine-tuning
```Please adjust the `fine_tune_llm.py` script and provide the necessary dataset files in the `dataset/` directory according to your specific fine-tuning requirements.
> Note: This `Dockerfile` assumes you have a compatible GPU and the necessary NVIDIA drivers installed on your host system.
To run the inference script, you can execute it directly using Python:
```bash
python3 inference.py
```### License
This project is licensed under the [MIT License](./LICENSE).
### Copyright
(c) 2024 [Finbarrs Oketunji](https://finbarrs.eu).