foundation-model-stack / fms-extras

Apache License 2.0
20 stars 9 forks source link

Add speculator weight tying #25

Closed daviswer closed 4 months ago

daviswer commented 7 months ago

Adds options for tying speculator head, embedding, and transition weights across stages. Parameter count responds as expected (decreasing when weights are tied). Setting all three options to True converts the MLP speculator into a fully recurrent model (with one separate initial projection from the base model into the speculator). These options are currently NOT hooked into existing scripts. Default behavior is unchanged.