llama-stack/llama_stack
Botao Chen 52a21ce78f
Free up memory after post training finishes (#770)
## context 
Currently, the GPU memory will be continuously occupied after the
training finishes. In this PR, we explicitly delete the reference and
clean up the memory after training finishes.

## test
Before the change, after training a llama 3.2 3B model, >6GB GPU memory
is still occupied

After the change, after training a llama 3.2 3B model, the GPU memory
drops to ~1GB

<img width="156" alt="Screenshot 2025-01-14 at 6 05 17 PM"
src="https://github.com/user-attachments/assets/45d212b1-a651-49f3-aad9-1c0a27fcebcf"
/>
2025-01-14 19:19:38 -08:00
..
apis [post training] define llama stack post training dataset format (#717) 2025-01-14 12:48:49 -08:00
cli Fix telemetry to work on reinstantiating new lib cli (#761) 2025-01-14 11:31:50 -08:00
distribution removing unused script file 2025-01-14 17:54:22 -08:00
providers Free up memory after post training finishes (#770) 2025-01-14 19:19:38 -08:00
scripts Fix to conda env build script 2024-12-17 12:19:34 -08:00
templates Fix fireworks run-with-safety template (#766) 2025-01-14 15:28:55 -08:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00