Skip to contents

||W - Q - A B^T||_F; smaller is better.

Usage

morie_kamath_ch4_loftq_objective(W, Q, A, B)

Arguments

W

Target weight.

Q

Quantised weight.

A, B

Factors.

Value

List with estimate, residual, quantisation_error, r.

Examples

morie_kamath_ch4_loftq_objective(W = c(1, 2, 3, 4, 5, 6, 7, 8), Q = c(1, 2, 3, 4, 5, 6, 7, 8),
  A = c(1, 2, 3, 4, 5, 6, 7, 8), B = 5L)
#> $estimate
#> [1] 71.41428
#> 
#> $residual
#>      [,1]
#> [1,]   -5
#> [2,]  -10
#> [3,]  -15
#> [4,]  -20
#> [5,]  -25
#> [6,]  -30
#> [7,]  -35
#> [8,]  -40
#> 
#> $quantisation_error
#> [1] 0
#> 
#> $r
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "LoftQ Frobenius objective (Kamath Eq 4.11)"
#>