
MoE per-expert capacity (Kamath Ch 2)
Source:R/kamath_llm2_native.R
morie_kamath_expert_capacity_factor.RdC * tokens / experts, with the drop threshold reported.
Examples
morie_kamath_expert_capacity_factor(100, 8, 1.25)
#> $estimate
#> [1] 15.625
#>
#> $capacity
#> [1] 15.625
#>
#> $slots
#> [1] 16
#>
#> $total_slots
#> [1] 128
#>
#> $min_dropped
#> [1] 0
#>
#> $headroom_per_expert
#> [1] 3.125
#>
#> $num_experts
#> [1] 8
#>
#> $n
#> [1] 100
#>
#> $method
#> [1] "MoE per-expert capacity (Kamath Ch 2)"
#>