
AdaLoRA SVD update with importance-based pruning (Kamath Ch 4)
Source:R/kamath_llm2_native.R
morie_kamath_adalora_rank_allocation.RdP diag(s) Q^T after zeroing all but the top-importance singular values.
kept is 0-BASED and sorted.
Examples
morie_kamath_adalora_rank_allocation(P = 0.5, s = 5L, Q = 0.5)
#> $estimate
#> [1] 1.25
#>
#> $Delta_W
#> [,1]
#> [1,] 1.25
#>
#> $s_pruned
#> [1] 5
#>
#> $kept
#> [1] 0
#>
#> $target_rank
#> [1] 1
#>
#> $effective_rank
#> [1] 1
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "AdaLoRA SVD update with importance-based pruning"
#>