Skip to content

Instantly share code, notes, and snippets.

View acalatrava's full-sized avatar

Antonio Calatrava acalatrava

  • Mobile Innovations SL
  • Spain
  • 21:44 (UTC +02:00)
  • X @acalatrava
View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO4FyRqgNGTBmYZwihUW5E85R8TNWuiETT5yXp8EVRnv0bkJMn2R2sUSfcAip+/N+q/Rn+iM/tLR3GiHwjWn3i+IDzeHDvU6tjlPsjLs0LxehnJXKtgFlwInY5IYWRByW6MQpVh2GTy1OCO3TvMpuXcTfAcNsg9qX3+/AhjcuAcu54ybjsgVeyl5lrWFxc17B0dUH11zh3HPo2gASB/QJlQIOmXMp+hpoL++I3hMKRduiNV8ArQrDO7y6GUwln5oZnRV6lh46bm4fCxuwqF1T19dOutU2XunFXq9Jad4k5cxranRnQdJxVSvqEwUhEyyzPUbf07RWRSi8jAGJscIn5 antonio@iMac
@acalatrava
acalatrava / finetune.py
Last active September 22, 2023 11:54
QLORA FineTuning
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Original file https://github.com/jzhang38/TinyLlama/blob/main/sft/finetune.py
#
"""
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7
pip install scipy evaluate tqdm pandas packaging
@acalatrava
acalatrava / README.md
Created April 11, 2024 08:47
Docker Volume Backup and Restore Script

Docker Volume Backup and Restore Script

Overview

This Bash script automates the process of exporting all Docker volumes to a compressed archive, creating a portable script for restoring these volumes on another system. It includes the generation of a recover.sh script for restoring the volumes from the archive and wraps everything into a self-executable import.sh script for easy transportation and execution.

Prerequisites

  • Docker installed on the host machine.
  • Bash shell environment.
  • Sufficient disk space for the backup files.