The Birmingham-based chocolate maker Cadbury is to cut up to 350 jobs, the Unite union has said.
It comes after employees were given letters that asked whether they would adapt to new flexible working conditions or take redundancy.
The parent company of Cadbury, Mondelez International, said the plant needed to be on a par with those in Europe, which are twice as productive.
In January, Mondelez announced a £75m investment to replace old machinery.
Gerard Coyne, regional secretary for Unite, said although there would be job losses, his union had ensured there would be fewer than originally feared.
Mr Coyne said he welcomed the investment which would "create a state-of-the-art chocolate-making facility fit for the 21st Century", securing jobs in the longer term.
Mondelez plans to close six production lines and replace them with four more efficient ones, leading to "a reduction in headcount".
Joe Clarke from Unite in Birmingham said there had "been some pain along the way, and [the union has] had some difficult conversations" with Mondelez.
He said he hoped the majority of redundancies would be people aged 55 or over who want to take the "lucrative settlement and move on to pastures new".
Mondalez spokesman Tony Bilsborough said: "These changes along with the investment can only be good news for the next generation of manufacturers here."
The modernisation of the plant and redundancies are likely to happen over the next two years.