From 78192f5934a2abcbd6a3a256f1d9bb32164cd2cc Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sat, 26 Sep 2026 18:53:33 -0300 Subject: llm-tune: LoRA fine-tuning for Llama in Rust with burn --- scripts/download.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 scripts/download.sh (limited to 'scripts') diff --git a/scripts/download.sh b/scripts/download.sh new file mode 100755 index 0000000..91c8a00 --- /dev/null +++ b/scripts/download.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Downloads the base model (SmolLM2-135M-Instruct) and the dolly-15k dataset +# into the default locations llm-tune expects. +set -euo pipefail +cd "$(dirname "$0")/.." + +HF=https://huggingface.co +MODEL=models/smollm2-135m-instruct +DATA=data/dolly-15k + +fetch() { # url dest + [ -s "$2" ] && { echo "ok $2"; return; } + echo "get $2" + curl -fL --progress-bar -o "$2.part" "$1" && mv "$2.part" "$2" +} + +mkdir -p "$MODEL" "$DATA" +for f in config.json generation_config.json model.safetensors tokenizer.json tokenizer_config.json; do + fetch "$HF/HuggingFaceTB/SmolLM2-135M-Instruct/resolve/main/$f" "$MODEL/$f" +done +fetch "$HF/datasets/databricks/databricks-dolly-15k/resolve/main/databricks-dolly-15k.jsonl" \ + "$DATA/databricks-dolly-15k.jsonl" + +sha256sum -c --quiet <