Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
837865a
transferred code from fork to new feature branch
Mar 18, 2025
f5ca8ea
added job file and experiment script
Mar 18, 2025
35ba496
Ready to run full finetune experiment
Mar 18, 2025
11bcb2b
fixed selectivesampler enumerate "typo"
Mar 21, 2025
91ad426
removed hpc files
Mar 21, 2025
e35eb89
singlesampler added
Mar 21, 2025
1619513
initial LESS branch commit
Mar 25, 2025
a45115d
LESSBasedSampler first implementation
Mar 25, 2025
ff224b7
experimenting with PercenteBasedSampler for LESS warmup step 1
Mar 26, 2025
407f44b
added selective sampler iter fix manually, should not conflict with f…
Mar 26, 2025
45045f9
PercentageSampler works
Mar 26, 2025
eb4124d
begun inital debugging for running LESSBasedSampler with subsampler
Mar 28, 2025
b5818e7
Think warmup works in subprocess now
Mar 28, 2025
01ec6be
LESS step 1) LESS_sampler mask + model signiture bug fix begun
Mar 28, 2025
33d1ca7
RadT only logs to default
Mar 28, 2025
96b9b84
ready to do experiments with RadT on HPC
Mar 31, 2025
1cee6f2
experiments will be done without radT
Mar 31, 2025
5825fd3
minor changes
Mar 31, 2025
89c8848
Merged with singleSampler
Mar 31, 2025
be4d754
Merge branch 'feat/nichr/RSRS_sampler' into feat/dsep-nichr/LESSBased…
Mar 31, 2025
a6611e3
LESS recipes, configs and LESS torch-tune implementation encapsulated…
Apr 1, 2025
dc1c2af
ready to attempt first merge into LESSExperiments branch
Apr 1, 2025
c9df995
test implementation for merge
Apr 1, 2025
dc495bb
removed test implementation
Apr 1, 2025
1da14d0
removed .job files from LESSBasedSampler branch
Apr 2, 2025
5200bd5
made changes to logging on ML-flow metrics
Apr 2, 2025
1aef873
added new pathing to LESS_sampler
Apr 2, 2025
c6debf6
added config logging
niklas-chr Apr 2, 2025
f89490e
.
niklas-chr Apr 2, 2025
c4e2adb
implementing instantiate_safe
Apr 2, 2025
fd68a40
changed datasets to only use cleaned versions to enforce sanitation
Apr 7, 2025
7d331e3
added cleaned data sets to less folder
Apr 8, 2025
1ba194a
added changes for reacent main commit which implements model checkpoi…
Apr 8, 2025
96c7f0d
Using recipes for each LESS step instead of subprocess. Step 1 recipe…
Apr 8, 2025
c9e3911
removed old implementation of LESS step 1
Apr 9, 2025
8e93b6b
LESSBasedSampler can now start/stop at different steps by config
Apr 9, 2025
92c67ff
added mkdir() call in checkpointer.py to ML-flow model dir creation a…
Apr 14, 2025
2a82a1e
LESS step2 starts now
Apr 15, 2025
61d0534
working on converting LESS collect_grad_reps into native torchtune (L…
Apr 16, 2025
dc08295
LESS step2 is now implemented natively in a torchtune recipe, it star…
Apr 16, 2025
ac61986
Cleaned up LESS step 1 & 2 native torchtune implementation. Ready to …
Apr 17, 2025
b7599fa
LESS step2 now dynamicaly sets adapter and recipe checkpoint full fil…
Apr 17, 2025
dea4777
LESS step 3.1 implemented, calculating validation gradients works
Apr 18, 2025
ad03321
Step1 now writes average learning rate to a csv file, step2 now takes…
Apr 21, 2025
25bfc42
revisioned LESSSampler step 1,2.1 and 2.2. Continueing implementation…
Apr 22, 2025
b5872ef
Merge branch 'test/dsep-nichr/Refactoring_LESS' into feat/dsep-nichr/…
Apr 22, 2025
7462ab1
inital implementation of LESS step 3.1 finished. Continueing with dyn…
Apr 23, 2025
ef7c9f0
Continueing implementation of Preprocessing validation ds
Apr 23, 2025
fe9f954
Cleaned up step 3.1 (removed commented code and changed function name).
Apr 28, 2025
a5769dd
continueing work on step3.2
Apr 28, 2025
a274628
Setup function in step 3.2 done, continueing with testing
Apr 29, 2025
c6227dd
totally lost, initiallizeing Extreme Programming
Apr 29, 2025
1ba0067
.
niklas-chr Apr 30, 2025
78b9538
step 3.2 and cleanup of other steps+LESSsampler + more
niklas-chr May 2, 2025
d5c8409
.
niklas-chr May 2, 2025
fc6f467
prints examples from dataloader for debugging / insight
niklas-chr May 2, 2025
1e6a6a6
step 3.2 seemms to work, but rework is needed to ensure functionality
May 2, 2025
fb898d1
3.2 seems to work. Ready ot try to run LESS entire pipeline
May 2, 2025
511a84c
almost done with LESS step 4. Begining experiment on entire pipeline…
May 5, 2025
fd5d709
getting torchtune template argument to work
May 5, 2025
7c65671
LESS step 4 now loads selected data as alpaca dataset
niklas-chr May 5, 2025
8ede243
Hopefully LESS works now, time for testing.
niklas-chr May 5, 2025
b0dd5ca
add traker for LESS to conda yaml
niklas-chr May 5, 2025
11a87a0
less adjustments to work on new hpc
niklas-chr May 6, 2025
9e009b3
.
niklas-chr May 6, 2025
9e83725
Several small changes to everything in LESS to work on new hpc
niklas-chr May 12, 2025
ff5efe8
added documentation to LESS implementation in torchtune
May 12, 2025
020f1c8
done
niklas-chr May 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ cython_debug/
.pypirc

# Ignored folders
/model_cache/

/model_cache/
/mlruns/
/less/gradstore/
/less/influence_scores
/less/cache_dir
/less/selected_data
# radT environment init
environment.sh
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Or with LoRA:

```bash
tune run recipe/eval.py --config config/llama3_2/1b_lora/eval_base.yaml
tune run recipe/eval.py --config config/llama3_2/1b_lora/eval_finetuned.yaml
tune run recipe/eval.py --config less/config/llama3_2/1b_lora/eval_finetuned.yaml
```

 
Expand Down
306 changes: 306 additions & 0 deletions Requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
name: selection
channels:
- pytorch
- nvidia
- nvidia/label/cuda-12.4.0
- conda-forge
- defaults
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r

dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- binutils_impl_linux-64=2.40=h5293946_0
- binutils_linux-64=2.40=hb3c18ed_9
- blas=1.0=mkl
- boto3=1.37.10=py312h06a4308_0
- botocore=1.37.10=py312h06a4308_0
- brotli-python=1.0.9=py312h6a678d5_9
- bzip2=1.0.8=h5eee18b_6
- ca-certificates=2025.4.26=hbd8a1cb_0
- certifi=2025.4.26=py312h06a4308_0
- charset-normalizer=3.3.2=pyhd3eb1b0_0
- cuda-cccl=12.4.99=0
- cuda-command-line-tools=12.4.0=0
- cuda-compiler=12.4.0=0
- cuda-cudart=12.4.99=0
- cuda-cudart-dev=12.4.99=0
- cuda-cudart-static=12.4.99=0
- cuda-cuobjdump=12.4.99=0
- cuda-cupti=12.4.99=0
- cuda-cupti-static=12.4.99=0
- cuda-cuxxfilt=12.4.99=0
- cuda-documentation=12.4.99=0
- cuda-driver-dev=12.4.99=0
- cuda-gdb=12.4.99=0
- cuda-libraries=12.4.0=0
- cuda-libraries-dev=12.4.0=0
- cuda-libraries-static=12.4.0=0
- cuda-nsight=12.4.99=0
- cuda-nsight-compute=12.4.0=0
- cuda-nvcc=12.4.99=0
- cuda-nvdisasm=12.4.99=0
- cuda-nvml-dev=12.4.99=0
- cuda-nvprof=12.4.99=0
- cuda-nvprune=12.4.99=0
- cuda-nvrtc=12.4.99=0
- cuda-nvrtc-dev=12.4.99=0
- cuda-nvrtc-static=12.4.99=0
- cuda-nvtx=12.4.99=0
- cuda-nvvp=12.4.99=0
- cuda-opencl=12.4.99=0
- cuda-opencl-dev=12.4.99=0
- cuda-profiler-api=12.4.99=0
- cuda-runtime=12.4.0=0
- cuda-sanitizer-api=12.4.99=0
- cuda-toolkit=12.4.0=0
- cuda-tools=12.4.0=0
- cuda-visual-tools=12.4.0=0
- expat=2.7.1=h6a678d5_0
- ffmpeg=4.3=hf484d3e_0
- filelock=3.17.0=py312h06a4308_0
- freetype=2.13.3=h4a9f257_0
- gcc=12.4.0=h236703b_2
- gcc_impl_linux-64=12.4.0=h26ba24d_2
- gcc_linux-64=12.4.0=h6b7512a_10
- gds-tools=1.9.0.20=0
- giflib=5.2.2=h5eee18b_0
- gmp=6.3.0=h6a678d5_0
- gmpy2=2.2.1=py312h5eee18b_0
- gnutls=3.6.15=he1e5248_0
- gxx=12.4.0=h236703b_2
- gxx_impl_linux-64=12.4.0=h3ff227c_2
- gxx_linux-64=12.4.0=h8489865_10
- idna=3.7=py312h06a4308_0
- intel-openmp=2023.1.0=hdb19cb5_46306
- jinja2=3.1.6=py312h06a4308_0
- jmespath=1.0.1=py312h06a4308_0
- jpeg=9e=h5eee18b_3
- kernel-headers_linux-64=3.10.0=he073ed8_18
- lame=3.100=h7b6447c_0
- lcms2=2.16=h92b89f2_1
- ld_impl_linux-64=2.40=h12ee557_0
- lerc=4.0.0=h6a678d5_0
- libcublas=12.4.5.8=0
- libcublas-dev=12.4.2.65=0
- libcublas-static=12.4.2.65=0
- libcufft=11.2.1.3=0
- libcufft-dev=11.2.0.44=0
- libcufft-static=11.2.0.44=0
- libcufile=1.9.0.20=0
- libcufile-dev=1.9.0.20=0
- libcufile-static=1.9.0.20=0
- libcurand=10.3.5.119=0
- libcurand-dev=10.3.5.119=0
- libcurand-static=10.3.5.119=0
- libcusolver=11.6.1.9=0
- libcusolver-dev=11.6.0.99=0
- libcusolver-static=11.6.0.99=0
- libcusparse=12.3.1.170=0
- libcusparse-dev=12.3.0.142=0
- libcusparse-static=12.3.0.142=0
- libdeflate=1.22=h5eee18b_0
- libffi=3.4.4=h6a678d5_1
- libgcc=14.2.0=h767d61c_2
- libgcc-devel_linux-64=12.4.0=h1762d19_102
- libgcc-ng=14.2.0=h69a702a_2
- libgomp=14.2.0=h767d61c_2
- libiconv=1.16=h5eee18b_3
- libidn2=2.3.4=h5eee18b_0
- libjpeg-turbo=2.0.0=h9bf148f_0
- libnpp=12.2.5.30=0
- libnpp-dev=12.2.5.2=0
- libnpp-static=12.2.5.2=0
- libnvfatbin=12.4.99=0
- libnvfatbin-dev=12.4.99=0
- libnvjitlink=12.4.127=0
- libnvjitlink-dev=12.4.99=0
- libnvjpeg=12.3.1.117=0
- libnvjpeg-dev=12.3.1.89=0
- libnvjpeg-static=12.3.1.89=0
- libpng=1.6.39=h5eee18b_0
- libsanitizer=12.4.0=ha732cd4_2
- libstdcxx=14.2.0=h8f9b012_2
- libstdcxx-devel_linux-64=12.4.0=h1762d19_102
- libstdcxx-ng=11.2.0=h1234567_1
- libtasn1=4.19.0=h5eee18b_0
- libtiff=4.7.0=hde9077f_0
- libunistring=0.9.10=h27cfd23_0
- libuuid=1.41.5=h5eee18b_0
- libwebp=1.3.2=h9f374a3_1
- libwebp-base=1.3.2=h5eee18b_1
- llvm-openmp=14.0.6=h9e868ea_0
- lz4-c=1.9.4=h6a678d5_1
- markupsafe=3.0.2=py312h5eee18b_0
- mkl=2023.1.0=h213fc3f_46344
- mkl-service=2.4.0=py312h5eee18b_2
- mkl_fft=1.3.11=py312h5eee18b_0
- mkl_random=1.2.8=py312h526ad5a_0
- mpc=1.3.1=h5eee18b_0
- mpfr=4.2.1=h5eee18b_0
- mpmath=1.3.0=py312h06a4308_0
- ncurses=6.4=h6a678d5_0
- nettle=3.7.3=hbbd107a_1
- networkx=3.4.2=py312h06a4308_0
- nsight-compute=2024.1.0.13=0
- numpy=2.0.1=py312hc5e2394_1
- numpy-base=2.0.1=py312h0da6c21_1
- openh264=2.1.1=h4ff587b_0
- openjpeg=2.5.2=h0d4d230_1
- openssl=3.5.0=h7b32b05_1
- pillow=11.1.0=py312hac6e08b_1
- pip=25.1=pyhc872135_2
- pysocks=1.7.1=py312h06a4308_0
- python=3.12.9=h5148396_0
- python-dateutil=2.9.0post0=py312h06a4308_2
- pytorch=2.5.1=py3.12_cuda12.4_cudnn9.1.0_0
- pytorch-cuda=12.4=hc786d27_7
- pytorch-mutex=1.0=cuda
- pyyaml=6.0.2=py312h5eee18b_0
- readline=8.2=h5eee18b_0
- requests=2.32.3=py312h06a4308_1
- s3transfer=0.11.2=py312h06a4308_0
- setuptools=78.1.1=py312h06a4308_0
- six=1.17.0=py312h06a4308_0
- sqlite=3.45.3=h5eee18b_0
- sysroot_linux-64=2.17=h0157908_18
- tbb=2021.8.0=hdb19cb5_0
- tk=8.6.14=h39e8969_0
- torchaudio=2.5.1=py312_cu124
- torchtriton=3.1.0=py312
- torchvision=0.20.1=py312_cu124
- typing_extensions=4.12.2=py312h06a4308_0
- urllib3=2.3.0=py312h06a4308_0
- wheel=0.45.1=py312h06a4308_0
- xz=5.6.4=h5eee18b_1
- yaml=0.2.5=h7b6447c_0
- zlib=1.2.13=h5eee18b_1
- zstd=1.5.6=hc292b87_0
- pip:
- absl-py==2.2.2
- accelerate==1.6.0
- aiohappyeyeballs==2.6.1
- aiohttp==3.11.18
- aiosignal==1.3.2
- alembic==1.15.2
- annotated-types==0.7.0
- antlr4-python3-runtime==4.9.3
- anyio==4.9.0
- attrs==25.3.0
- bitsandbytes==0.45.5
- blinker==1.9.0
- blobfile==3.0.0
- cachetools==5.5.2
- chardet==5.2.0
- click==8.1.8
- cloudpickle==3.1.1
- colorama==0.4.6
- contourpy==1.3.2
- cycler==0.12.1
- databricks-sdk==0.52.0
- dataproperty==1.1.0
- datasets==3.5.1
- deprecated==1.2.18
- dill==0.3.8
- docker==7.1.0
- evaluate==0.4.3
- fast-jl==0.1.3
- fastapi==0.115.12
- flask==3.1.0
- fonttools==4.57.0
- frozenlist==1.6.0
- fsspec==2025.3.0
- gitdb==4.0.12
- gitpython==3.1.44
- google-auth==2.40.0
- graphene==3.4.3
- graphql-core==3.2.6
- graphql-relay==3.2.0
- greenlet==3.2.1
- gunicorn==23.0.0
- h11==0.16.0
- hf-transfer==0.1.9
- huggingface-hub==0.30.2
- importlib-metadata==8.6.1
- itsdangerous==2.2.0
- joblib==1.5.0
- jsonlines==4.0.0
- kagglehub==0.3.12
- kiwisolver==1.4.8
- lm-eval==0.4.8
- lxml==5.4.0
- mako==1.3.10
- markdown==3.8
- matplotlib==3.10.1
- mbstrdecoder==1.1.4
- migedit==0.3.4
- mlflow==2.22.0
- mlflow-skinny==2.22.0
- more-itertools==10.7.0
- multidict==6.4.3
- multiprocess==0.70.16
- nltk==3.9.1
- numexpr==2.10.2
- omegaconf==2.3.0
- opentelemetry-api==1.32.1
- opentelemetry-sdk==1.32.1
- opentelemetry-semantic-conventions==0.53b1
- packaging==24.2
- pandas==2.2.3
- pathvalidate==3.2.3
- peft==0.15.2
- portalocker==3.1.1
- propcache==0.3.1
- protobuf==6.30.2
- psutil==7.0.0
- pyarrow==19.0.1
- pyasn1==0.6.1
- pyasn1-modules==0.4.2
- pybind11==2.13.6
- pycryptodomex==3.22.0
- pydantic==2.11.4
- pydantic-core==2.33.2
- pyparsing==3.2.3
- pytablewriter==1.2.1
- pytz==2025.2
- radt==0.2.20
- regex==2024.11.6
- rouge-score==0.1.2
- rsa==4.9.1
- sacrebleu==2.5.1
- safetensors==0.5.3
- scikit-learn==1.6.1
- scipy==1.15.2
- sentencepiece==0.2.0
- smmap==5.0.2
- sniffio==1.3.1
- sqlalchemy==2.0.40
- sqlitedict==2.1.0
- sqlparse==0.5.3
- starlette==0.46.2
- sympy==1.13.1
- tabledata==1.3.4
- tabulate==0.9.0
- tcolorpy==0.1.7
- threadpoolctl==3.6.0
- tiktoken==0.9.0
- tokenizers==0.21.1
- torchao==0.10.0
- torchdata==0.11.0
- torchtune==0.5.0
- tqdm==4.67.1
- tqdm-multiprocess==0.0.11
- traker==0.1.3
- transformers==4.51.3
- typepy==1.3.4
- typing-inspection==0.4.0
- tzdata==2025.2
- uvicorn==0.34.2
- werkzeug==3.1.3
- word2number==1.1
- wrapt==1.17.2
- xxhash==3.5.0
- yarl==1.20.0
- zipp==3.21.0
- zstandard==0.23.0
18 changes: 0 additions & 18 deletions conda.yaml

This file was deleted.

11 changes: 6 additions & 5 deletions config/llama3_2/1b_full/eval_base.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ output_dir: ./ # Not needed

# Model Arguments
model:
_component_: torchtune.models.llama3_2.llama3_2_1b
_component_: torchtune.models.llama3_2.llama3_2_3b

checkpointer:
_component_: torchtune.training.FullModelHFCheckpointer
checkpoint_dir: model_cache/downloaded_models/Llama-3.2-1B-Instruct/
checkpoint_dir: model_cache/downloaded_models/Llama-3.2-3B-Instruct/
checkpoint_files: [
model.safetensors
model-00001-of-00002.safetensors,
model-00002-of-00002.safetensors,
]
output_dir: ${output_dir}
model_type: LLAMA3_2

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: model_cache/downloaded_models/Llama-3.2-1B-Instruct/original/tokenizer.model
path: model_cache/downloaded_models/Llama-3.2-3B-Instruct/original/tokenizer.model
max_seq_len: null

# Environment
Expand All @@ -30,7 +31,7 @@ dtype: bf16
seed: 1234 # It is not recommended to change this seed, b/c it matches EleutherAI's default seed

# EleutherAI specific eval args
tasks: ["truthfulqa_mc2"]
tasks: ["truthfulqa_mc2", "commonsense_qa"]
limit: null
max_seq_length: 4096
batch_size: 8
Expand Down
Empty file modified config/llama3_2/1b_full/eval_finetuned.yaml
100644 → 100755
Empty file.
Loading