Total Parameter added to original model
km5ar opened this issue · comments
Is there anyway we can calculate the total parameter added to original model?
Hi @km5ar,
to get a summary of the currently added adapters, you can use the adapter_summary()
function like this:
print(model.adapter_summary())
For an example script & output, see here: #371
You can then sum up the "#Param" column values to get the total number of parameters added.
Alternatively, if you want a function that directly returns the total number of added parameters, you could write a new function based on the implementation of adapter_summary()
. This would need just very few changes; the relevant part in the code is here:
adapters/src/adapters/model_mixin.py
Lines 1033 to 1050 in 35fd1c2