  We study local multiplicities associated to the so-called generalized Shalika
models. By establishing a local trace formula for these kind of models, we are
able to prove a multiplicity formula for discrete series. As a result, we can
show that these multiplicities are constant over every discrete Vogan
$L$-packet and that they are related to local exterior square $L$-functions.
