Promise and Peril of Collaborative Code Generation Models: Balancing Effectiveness and Memorization