show/hide this revision's text 2 need GCH in the ground model

Yes. A fairly general answer to such questions is provided by Easton’s theorem: if the ground model satisfies GCH and $F$ is a class function from a subclass of regular cardinals to cardinals such that $F$ is nondecreasing and $\kappa< \operatorname{cf}(F(\kappa))$ for each $\kappa\in\operatorname{dom}(F)$, then one can find construct a forcing extension with the same cardinals and cofinalities which satisfies $2^\kappa=F(\kappa)$ for each $\kappa\in\operatorname{dom}(F)$.

show/hide this revision's text 1

Yes. A fairly general answer to such questions is provided by Easton’s theorem: if $F$ is a class function from a subclass of regular cardinals to cardinals such that $F$ is nondecreasing and $\kappa< \operatorname{cf}(F(\kappa))$ for each $\kappa\in\operatorname{dom}(F)$, then one can find a forcing extension with the same cardinals and cofinalities which satisfies $2^\kappa=F(\kappa)$ for each $\kappa\in\operatorname{dom}(F)$.